-
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
VS2015 Update 1: MVC build fails with error MSB4064: The "Features" parameter is not supported by the "Csc" tas #1537
Comments
Strangely enough, both scripts work on my machine. And actually, it shouldn't make any difference, since There is somebody else having the same issue at StackOverflow and at the Roslyn repo (dotnet/roslyn#9538). |
That is strange indeed. |
I don't have VS 2015 on this machine, only up to 2013. So this is some MSBuild f**kery going on here, not an Paket issue. |
I only can reproduce it when I explicitly use |
It may well be msbuild related, but before paket modified the csproj file it worked just fine. |
Well it worked with "Developer Command Prompt for VS2012". So it does seem to be related to msbuild versions. |
A little bit strange. The documentation of the Csc Task does not say anything about a Features Property (https://msdn.microsoft.com/en-us/library/s5c8athz%28v=vs.140%29.aspx) |
And I just failed to recreate on another workstation that does have VS2015. That machine however did not have VS2015 Update 1 nor is it a Windows 10 machine like mine. @Stift: Do you have Update 1 and/or Windows 10? |
Confirmed. It seems the problem occurs once you upgrade to VS2015 Update 1. |
can I get a TLDR? What's the exact issue? |
the props files don't get imported. in this case for microsoft.net.compilers |
Oh. I see - They are imported but at the end of the file. VS puts them on top of the csproj. When I put manually the paket stuff on top, it works. |
It doesn't get imported? at all? or just too late? what do we need to change? XML looks correct to me. |
Repro: Create a MVC project in VS 2015, convert it to paket, run |
xml looks okay, but position seems to play a role. |
Ah, then this might be related to(possibly a duplicate) #1487 |
@forki @Stift |
ok looks like I have an idea how to fix this. If we move the props up to right after the property groups (See https://gist.github.com/forki/479c1c8e355e69e165af#file-test-csproj-L44) then it builds for me. |
i think it could also have to do with the package itself. I have to recheck but it seems newer versions of net.compilers package works fine |
Ok. @mlidbom could you also reproduce this. Because then it seems to be a problem in the package. |
@forki With the real problem solution (not the minimal repro havent tested with that) it only seems to work for me if I move the props to the very top of the csproj. Right below the imports Microsoft.TypeScript.Default.props and Microsoft.Common.props Note that once you get it building you have to delete the obj and bin folder to recreate the problem again. It is easy to miss and believe that something works even though it does not. |
I did that. the file in the gist works fine for me. But it needs to be right after the propertygroups - otherwise it doesn't know which target framework was set |
Ah, most likely me not doing the edits correctly then. I don't speak msbuild :) |
:) |
I bet if you remove the framework restriction from If so, the solution would be, to import the |
I'm having real trouble trying to upgrade the compiler package in the problem solution. Is this a bug? If I explicitly ask for an upgrade of a singe package, should paket go ahead and downgrade each preversion packages automatically? Actually I find it odd to say the least that it would silently downgrade any package during any update operation.... |
thanks. Let's do it then. |
And with that I just found another bug in the bootstrapper. Not a serious one. Will take care about this after Easter. |
Since the property definitions depend on |
See https://github.com/fsprojects/Paket/blob/master/src/Paket.Core/ProjectFile.fs#L949 If you could send a PR which moves "k" right behind that node (if it exists) then this would be awesome. |
So we would have the following indices? That would not break the MVC issue again?
|
don't think so. It's still very "high" in the xml. |
… follow the top property groups fsprojects#1537
I've just realized you actually proposed to move it right behind Should it look specifically for |
yes I think that would be better |
actually I think that would indeed fix all the current issues. (until we find the next one) |
see #1564 |
please try with 2.57.1 |
@mlidbom does it still work for you? |
I'm afraid not (Actually I don't think it ever did. I must have screwed up testing it somehow. Sorry.).
I'm attaching a zip with a git repository that attempts to illustrate this with different branches and commits. |
but it still works with latest version of said package? |
I was about to say no until I checked and it turns out that there are two new stable versions. Version 1.1.1 no longer works. I get But luckily it does work with the 1.2.0 and 1.2.1 versions of the package that were both released March 31. |
so latest version of the package works with latest version of paket? |
Yes. |
Hi there, I've recently installed the VS15 Pre, might that be something to take into consideration? If I create a new Asp.Net Web application with MVC4, I can build it fine. Then I've just opened up paket and tried a "convert-from-nuget" and afterwards it fails with this error. This is the paket.dependencies file created: Can I provide any other information to guide you? |
Can you please create a sample with the broken csproj and a manually fixed version? |
@forki I've got no clue about how to fix this, but here is a link to the example: https://github.com/kjellski/paket-conver-from-nuget-example |
Did you try to update like it was described above? |
@forki I'm really sorry, I must have missed the instructions... should I try to reproduce with version 3.0.0-beta028 of paket or how can I try to fix this by myself? I don't understand how you rearranged the xml to be honest... :/ |
I meant did you try to use the latest packages. There was a bug in on of
|
Ah, no, I've just created a brand new project from VS2015 and let it do its thing, then I've made sure to build and run it once to confirm it's working. After that, I've used "paket convert-from-nuget" and let it do its thing. Afterwards it was broken. I've not updated anything. |
Yes. I understand. But as described above that's not going to work with our I know this sounds stupid, but I think there is nothing we can do here. You
|
There are a few twists to when you encounter this bug.
I eventually found that it occurs every time if:
I've attached a zip with a repro solution.
Run build-fails.bat to see the build fail.
Run build-succeeds.bat to see the build succeed.
Edit: Seems the problem occurs with VS2015 Update 1. I'm afraid this likely means that every paket user with an MVC project will start to see their builds failing when they update.
Edit2: The exact error from the build log:
PaketBugRepro.zip
The text was updated successfully, but these errors were encountered: