Microsoft.Build.NoTargets project expects incorrect ouput
See original GitHub issueVisual Studio Version: 16.4.4
Summary: Having a project with Microsoft.Build.NoTargets is never up-to-date because it expects an output that is never generated.
Steps to Reproduce:
-
Create and SDK project.
-
Update the project to be Microsoft.Build.NoTargets. See mine:
<Project Sdk="Microsoft.Build.NoTargets">
<PropertyGroup>
<TargetFramework>net472</TargetFramework>
</PropertyGroup>
</Project>
I also had to add the following global.json:
{
"msbuild-sdks": {
"Microsoft.Build.NoTargets": "1.0.85"
}
}
- Build twice
Expected Behavior: The project should be up to date.
Actual Behavior: The project is not up to date because it expects the pdb file. Here is the log:
1>FastUpToDate: Adding UpToDateCheckBuilt outputs: (RepoNoTargetsBug)
1>FastUpToDate: 'C:\Users\edgarsil.000\source\repos\RepoNoTargetsBug\RepoNoTargetsBug\obj\Debug\net472\RepoNoTargetsBug.pdb' (RepoNoTargetsBug)
1>FastUpToDate: Output 'C:\Users\edgarsil.000\source\repos\RepoNoTargetsBug\RepoNoTargetsBug\obj\Debug\net472\RepoNoTargetsBug.pdb' does not exist, not up to date. (RepoNoTargetsBug)
User Impact: Project is never up to date.
Issue Analytics
- State:
- Created 4 years ago
- Comments:5 (1 by maintainers)
Top Results From Across the Web
Microsoft.Build.NoTargets project expects incorrect ouput
Having a project with Microsoft.Build.NoTargets is never up-to-date because it expects an output that is never generated. Steps to Reproduce:.
Read more >NoTargets
ProjectReferences do not work for a NoTargets project that sets TargetFrameworks and NoTargetsDoNotReferenceOutputAssemblies #469 opened by ericstj.
Read more >Using Microsoft.Build.NoTargets getting ucrt path
I have created an msbuild project which uses Microsoft.Build.NoTargets and I need to import C:\Program Files (x86)\Windows ...
Read more >MSBuild Targets
A target element can have both Inputs and Outputs attributes, indicating what items the target expects as input, and what items it produces...
Read more >NuGet pack and restore as MSBuild targets
$(OutputPath) is relative and expects that you are running the command from the project root. pack target. For .NET projects that use the ......
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
@edgarrs Thanks for the bug, I’ve moved it over to https://github.com/microsoft/MSBuildSdks/issues/148 as they own this, thanks.
@edgarrs You can enclose inline code in backticks and code blocks in triple backticks. You can even specify the language with triple backticks.