PP file output is not generated during the build
See original GitHub issuePP file output is not being generated during the build.
Steps
- dotnet new
- dotnet add package contentfilesexample -v 1.0.2
- dotnet restore
- Add to Program.cs
Console.WriteLine(ExampleReader.GetDataText());
- dotnet build
Expected
ExampleReader will be in the current namespace from the pp file.
Actual
ExampleReader does not exist
Originally reported here https://github.com/NuGet/Home/issues/4803 //cc @damianh
From @natidea
I took a look at the pp file transformation issue and found a couple of things:
- For the ContentFilesExample package, I don’t see pp files listed as dependencies in the assets file. They occur in the “libraries” but we are only processing content from the active TFM here: Microsoft.PackageDependencyResolution.targets#L213
- For the LiteGuard package, I do see the pp files in the dependencies, but they were not being processed because
CopyLocalLockFileAssemblies
=false here: Microsoft.PackageDependencyResolution.targets#L414 I was able to fix this by setting the property in my project file:
<CopyLocalLockFileAssemblies>true</CopyLocalLockFileAssemblies>
Now I can use the Guard
.
So somewhere along the way, some concepts may have been crossed. We default CopyLocalLockFileAssemblies
to true in that target file, but it gets set to false in Microsoft.NET.Sdk.BeforeCommon.targets#L57. Perhaps the real issue is that the produce content assets task is tied to ResolveLockFileCopyLocalProjectDeps
and should instead be triggered in some other way.
Issue Analytics
- State:
- Created 6 years ago
- Reactions:7
- Comments:32 (15 by maintainers)
Top Results From Across the Web
Build input file cannot be found {PATH} did you forget to ...
Seems like you have moved bridging file to other folder and Xcode compiler can not find it. Try to move this file in...
Read more >Build failing with "command failed to write the following ...
Failed because this command failed to write the following output files: Library/Bee/artifacts/MacStandalonePlayerBuildProgram/Features/Assembly- ...
Read more >PDF not created after compilation - TeX
The first line of the log says: preloaded format=latex 2019.1.17. The last line says. Output written on main.dvi (112 pages, 306844 bytes).
Read more >Tests wont run from build output folder when using ...
When i run my test using my run settings file. It keeps wanting to run the test from the test results folder instead...
Read more >output file can not be generated in ccs - TI E2E
Problem does not occur when we try to build from control suite but it does not generate .out file when tries to do...
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 FreeTop 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
Top GitHub Comments
Please move this to milestone: 2.1.0
@ahmoh I’d argue that the ability to edit the source code of the package was a problem with the old system. What happens when a new version of the package is released? Editing the code is effectively forking the package. Source code packages are the wrong mechanism to distribute code which is intended to be edited. You should be using templates for that.