-
Notifications
You must be signed in to change notification settings - Fork 10.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
When adding Microsoft.AspNetCore.Mvc.Testing to test project, dotnet publish --no-build command fails with NETSDK1085 #40330
Comments
We've moved this issue to the Backlog milestone. This means that it is not going to be worked on for the coming release. We will reassess the backlog following the current release and consider this item at that time. To learn more about our issue management process and to have better expectation regarding different types of issues you can read our Triage Process. |
We have this problem as well, and I can narrow it down a little bit: It still works with Microsoft.AspNetCore.Mvc.Testing v5.0.17, but I get NETSDK1085 when I upgrade so 6.0.0 |
I've encountered this too. The issue is still reproducible. |
The workaround is to set the project referencing Microsoft.AspNetCore.Mvc.Testing is have
but then you can start to encounter this, so potentially more changes needed |
I've encountered this too. The issue is still reproducible. |
Overriding the
It seems like the issue is fixed in 7.0: #43329. |
Closing as this has been backported to both 7.0 and 6.0. If the issue still persists, please file a new issue and I'll let you know. |
Is there an existing issue for this?
Describe the bug
I have 2 projects.
The test project uses WebApplicationFactory, for which the Microsoft.AspNetCore.Mvc.Testing package version 6.0.2 was included. Also in the test project, the IsPublishable property is set to false.
Then a sequence of commands is executed:
dotnet restore
dotnet build -c Release --no-restore
dotnet test -c Release --no-build
dotnet publish -c Release --no-build -o app/
As a result, I get the error "NETSDK1085: The 'NoBuild' property was set to true but the 'Build' target was invoked."
Expected Behavior
WebAPI project is published without errors
Steps To Reproduce
Clone repo:
https://github.com/Maxwellwr/net6publish
Execute:
dotnet restore
dotnet build -c Release --no-restore
dotnet test -c Release --no-build
dotnet publish -c Release --no-build -o app/
Exceptions (if any)
No response
.NET Version
6.0.200
Anything else?
No response
The text was updated successfully, but these errors were encountered: