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
.NET 2.0 SDK breaks ASP.Net Core 1.1 Web App that references a NetStandard class library #2129
Comments
This looks like multiple issues, one that you've already commented on (#2126) and another which likely belongs here: https://github.com/dotnet/sdk. |
I don't think #2126 is the same as this. After looking at it closer the error message is different and coming from a different spot in the code. I'd be happy to open new issue in the appropriate repos, I just figured I'd start here since this happens with a web app only and not console apps or anything else. |
@jeffpapp this is the piece I find most concerning. If I understand correctly, you only installed new versions, but didn't change the project to .NET Core 2.0 or .NET Standard 2.0. Just installing the new version shouldn't have broken things. That's why I think this is likely an issue for https://github.com/dotnet/sdk. As a workaround, are you able to uninstall the 2.0 SDK? |
I can either uninstall or downgrade the SDK version via global.json to get rid of the runtime error, but then VS 2017.3 won't build because of a |
We have also noticed that if we manually copy over the missing .net 4.6.2 dlls into the bin directory then the web app will run so maybe https://github.com/dotnet/sdk is the best place to file an issue to hopefully get this fixed |
I created dotnet/sdk#1488 so hopefully that will help resolve this for us. Thanks for your help @natemcmaster |
This issue is being closed because it has not been updated in 3 months. We apologize if this causes any inconvenience. We ask that if you are still encountering this issue, please log a new issue with updated information and we will investigate. |
If someone else runs into this problem...we ran into it after updating VS to 15.8. Updating Microsoft.AspNetCore to >= 1.1.7 and Microsoft.AspNetCore.Mvc to >= 1.1.8 fixed the problem on our side. |
I have a ASP.Net Core 1.1 Web App running under net462 that references a netstandard1.5 class library project.
Once I installed the .Net Core 2.0 SDK along with VS2017.3 I started getting a
InvalidOperationException: Can not find assembly file Microsoft.CSharp.dll at 'C:\Projects\Temp\VS2017Issue\WebApplication1\bin\Debug\net462\refs,C:\Projects\Temp\VS2017Issue\WebApplication1\bin\Debug\net462\'
error at runtime. I have also reproduced this on a machine with just the .Net 2.0 SDK and not VS2017.3. If I remove the project reference to the class library project then the runtime error goes away.If I add a global.json with an sdk version of 1.0.4 and clean and rebuild all the projects the runtime error also goes away, but then VS2017.3 gives me a build error that says
The version of Microsoft.NET.Sdk used by this project is insufficient to support references to libraries targeting .NET Standard 1.5 or higher. Please install version 2.0 or higher of the .NET Core SDK.
. This build error also goes away if I remove the reference to the class library project.So I'm stuck between either being able to run my project at the lower .Net SDK version and not build in VS, or being able to build in VS but then get a runtime error anytime I run my app.
Any help figuring out a way that I could get back to a point where I can build and run would be greatly appreciated.
I have a simple example of the issue at https://github.com/squareitechnologies/VS2017Issue if that helps diagnose the issue
This is the full error message and stack trace that I'm getting at runtime
The text was updated successfully, but these errors were encountered: