aarnott / readonlysourcetree Goto Github PK
View Code? Open in Web Editor NEWA NuGet package that makes your project build to top-level bin and obj directories.
License: Other
A NuGet package that makes your project build to top-level bin and obj directories.
License: Other
The ReadOnlySourceTree.targets may not be imported before other NuGet packages that need to read such properties as IntermediateOutputPath
. This causes build failures in consuming projects because other .targets will read the properties during evaluation model and try to write to files in directories that do not exist.
(first: this is a great project--thanks!)
I tried adding the ReadOnlySourceTree NuGet package to a solution that contained a native DLL project. It correctly got rid of the bin/obj directories from under the native DLL's project source directory, but instead of the resulting native DLLs going into \bin, they just went at the root (\x64\Debug and \x64\Release for x64 binaries; \Debug and \Release for x86 binaries.
Nuget package: ReadOnlySourceTree.0.1.37-beta
A csproj uses this Nuget package and has this property:
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
...
<DocumentationFile>bin\Debug\Foo.xml</DocumentationFile>
...
</PropertyGroup>
Build fails with this error:
CSC : error CS0016: Could not write to output file '.....\bin\Debug\Foo.xml' -- 'Could not find a part of the path
It looks like the build doesn't set the DocumentationFile property to point to the same folder at the binary.
The workaround is to have this property. The condition is for ensuring that the documentation file is not generated when the project is being built by GenerateTemporaryTargetAssembly, when ReadOnlySourceTree is not imported.
<DocumentationFile Condition="'$(OutputPath)' != ''">$(OutputPath)$(AssemblyName).xml</DocumentationFile>
When a project builds for AnyCPU and x86, for example, the default output folders move x86 to a subfolder. This project should do the same thing.
I'm pretty sure the xml documentation output group will have the wrong path. Others may also.
Steps to repro:
-Zip the current repo
-Extract the "DefaultCSharpClassLibrary" folder
-Open it Under VS14.0.24720.0 CE using File->Open-Project/Solution
-Save a solution file under the parent folder ".."
-Modify MSBuild project build output verbosity in VS to diagnostic
-Restore the "ReadOnlySourceTree" Nuget package updating it to the current latest (1.13)
-Clean the solution
-Build the solution
-Copy and paste MSBuild output to a log file (attached in for my system here... sorry but in french because I have not found a way to output it in english)
MSBuildLog.txt
Because the C#/VB project systems tend to write out the explicit project-relative output path for the XML file, it needs to be explicitly rewritten in the readonlysourcetree.targets to prevent its generation under src
. It is already copied to the proper bin folder. We just need to keep it out of the wrong folder in the first place.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.