-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
dotnet build doesn't compile with 2.0.0-preview2-final for MVC template #8426
Comments
This has been fixed in the latest preview2 build. |
Looks like it's not the same story between VS latest and dotNet/CLI latest (2.0.0-preview2-006497); from CLI:
At least the build is successful. From VS (latest 15.3.0 Preview 2.1), new project to create the same type of project: txs |
if I change back the line in Csproj
to
VS compile but not DotNet cli |
I can reproduce this too, when running |
I have the same problem with 2.0.0-preview2-006497. @livarcocc : Can you reopen this issue? Is seems to be back... |
@mlorbetske @balachir can you guys take a look at this? |
I think this is because the change to support AssetTargetFallback came in 15.3 Preview 3, so updating VS to the very latest preview again should work. |
I'm only compiling via the command line (I haven't installed VS) and I see the restore warnings, namely
I assume |
I'm getting a very similar error ...
And I'm trying to run through @jongalloway conference workshop examples from - https://github.com/jongalloway/aspnetcore-app-workshop/blob/master/docs/2.%20Build%20out%20BackEnd%20and%20Refactor.md - and I'm up to "Add a new database migration" and it won't build. I've tried updating the package references:
and the cli tools references ...
Have I missed something? Running dotnet run or dotnet restore on the command line I get ...
|
@WestDiscGolf we have updated the SDK to have an implicit AssetTargetFallback to net461. Your project probably has a PackageTargetFallback property and the two are mutually excluding, like the error message suggests. So, you can either update your project and replace PackageTargetFallback with AssetTargetFallback, or you can disable the implicit ATF by setting DisableImplicitAssetTargetFallback to true in your project. |
@livarcocc Thanks for the speedy response. On replacing PackageTargetFallback with AssetTargetFallback I get, in yellow in powershell, the following:
Adding in the DIATF node in the csproj file it fails with:
Is that right? Should there still be a warning? This is all new to me so apologies if these are stupid questions / issues. |
The warning is expected, though in the latest versions of asp.net I believe we have moved to no longer depend on that package. So, in newer versions, the warning should not appear. |
@livarcocc Cool, thanks for letting me know! |
This causing the issue I'm seeing when trying to build coreclr (also corefx)? https://github.com/dotnet/coreclr/issues/13025 |
@benaadams You need to choose either ATF or PTF. I explained it above. |
@livarcocc not entirely sure what |
Think its the buildtools have filed issue dotnet/buildtools#1617 |
Helping search engines find the right content: https://docs.microsoft.com/en-us/nuget/reference/errors-and-warnings#nu1003 |
Steps to reproduce
Add new project from VS (mvc --auth Individual):
Do the same from shell command:
Expected behavior
build
Actual behavior
error NU1003: PackageTargetFallback and AssetTargetFallback cannot be used together. Remove PackageTargetFallback(deprecated) references from the project environment.
Environment data
dotnet --info
output:The text was updated successfully, but these errors were encountered: