-
Notifications
You must be signed in to change notification settings - Fork 525
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
$(__paket__.... variables in csproj breaks website after convert-from-nuget, or paket update #1536
Comments
yeah convert-from-nuget uses the normal install process to add these imports. So this is at least consistently wrong ;-) Will take a look later today |
Great! Thanks for the quick response :) |
just tried to reproduce. Can you please send me a broken csproj and corresponding paket.references + paket.dependencies to sforkmann @ gmail ? |
Seems that it's related to #1487, but in the latest version this should be actually working. |
yees it's related, but it seems we still generate something that doesn't work. |
Wait a minute, |
argh. thanks for clarification. yes we don't execute ps1 scripts (same as newer nuget). Is there another way to create that thing? |
One correction: The roslyn folder is created when you build. Not when you install the package. I'll see if I can create a minimal repro. |
Seems that Microsoft.CodeDom.Providers.DotNetCompilerPlatform.BinFix fixes it with a |
Darn, my migration script caches paket.exe and it was not the latest version. I'm very sorry to have wasted your time with a bug report when using an old version :( However, Now I get a build error instead:
I will investigate this a bit and create a new issue if it turns out to be a Paket problem. |
It does seem to be a bug in paket causing the build failure. |
After running convert-from-nuget on a solution containing a web project I ended up with these two lines in the web csproj file:
<Import Project="..\packages\Microsoft.CodeDom.Providers.DotNetCompilerPlatform\build\$(__paket__Microsoft_CodeDom_Providers_DotNetCompilerPlatform_props).props" Condition="Exists('..\packages\Microsoft.CodeDom.Providers.DotNetCompilerPlatform\build\$(__paket__Microsoft_CodeDom_Providers_DotNetCompilerPlatform_props).props')" Label="Paket" /> <Import Project="..\packages\Microsoft.Net.Compilers\build\$(__paket__Microsoft_Net_Compilers_props).props" Condition="Exists('..\packages\Microsoft.Net.Compilers\build\$(__paket__Microsoft_Net_Compilers_props).props')" Label="Paket" />
Building "works" with this in place but the Imports are apparently not working, No "roslyn" folder is created in the bin folder, and trying to use the website gives the error:
Since this is a big powershell automated batch migration of many solutions with many web projects I added a bit of code that got this working again (Just replace the variables with the actual file names):
$projectFileContent = $projectFileContent.Replace('$(__paket__Microsoft_CodeDom_Providers_DotNetCompilerPlatform_props).props','Microsoft.CodeDom.Providers.DotNetCompilerPlatform.props') $projectFileContent = $projectFileContent.Replace('$(__paket__Microsoft_Net_Compilers_props).props','Microsoft.Net.Compilers.props')
I was hoping this was a bug in the migration code, and that I was done, but it seems not.
Whenever I run paket update (Or, I'm guessing, any other paket command that changes csproj files) the lines that break the build are reintroduced.
This is a showstopper for us in our migration to paket :( . I would greatly appreciate getting this addressed since I really really want the advantages that paket will give us.
The text was updated successfully, but these errors were encountered: