brentspell / nubuild Goto Github PK
View Code? Open in Web Editor NEWNuGet package build system and Visual Studio project templates
License: GNU Lesser General Public License v3.0
NuGet package build system and Visual Studio project templates
License: GNU Lesser General Public License v3.0
VS2010 with NuGet 2.6 or NuGet 2.7, NuBuild 1.6 gives error: There was an error generating the XML document (InvalidOperationException) NuBuild(61,7).
With NuGet 2.5 it works.
Running the build from MSbuild works OK.
Unfortunately it is not reproducable on all systems. Is there any way we can provide additional infomation?
Hi,
I have the quick question. The Vs by default has debug & release builds. I added 'nuget' build to the targets. Only this target must build nuget packages, other one should skip. What is the best way to that?
Thanks for ideas and time
J.B
Most of our VS projects have AnyCPU build configurations removed, instead using specific configurations such as x86 or x64. NuBuild projects seem to want an AnyCPU configuration on projects that are referenced to them.
I think the fix would be to allow NuBuild projects to have other configurations like x86 and x64 so the Platform property can match that of referenced projects.
Here are the steps to reproduce:
The OutputPath property is not set for project 'NuBuildTest.csproj'. Please check to make sure that you have specified a valid combination of Configuration and Platform for this project. Configuration='Debug' Platform='AnyCPU'. This error may also appear if some other project is trying to follow a project-to-project reference to this project, this project has been unloaded or is not included in the solution, and the referencing project does not build using the same or an equivalent Configuration or Platform.
Per http://docs.nuget.org/docs/reference/nuspec-reference#Replacement_Tokens, NuGet allows replacement tokens to be specified from MSBuild properties (
Property "Version source" set to Manual.
For example 1.0.2-beta1 is perfectly valid for NuGet.
The build fails with a description "Input string was not in a correct format. (FormatException), which seems to be thrown from the NuPrepare task.
I had problems during "Add new project", only an empty folder created on disk and nothing else, no error message, nothing, but renaming the .nuproj to .csproj in project template repaired it.
I fixed it. I will merge it with the new v1.8 and send a pull request.
Currently the .nuspec file in the project template is encoded in UTF-16LE. This wouldn't be a problem, except that git diff
seems unable to work with this encoding (it considers the file as binary). Unless there is a compelling reason to use UTF-16, I suggest using UTF-8 instead.
C:\Program Files (x86)\MSBuild\NuBuild\v1\NuBuild.targets (101): Object reference not set to an instance of an object. (NullReferenceException)
Fill in <frameworkAssemblies>
and <dependencies>
sections from the referred projects. Presumably NuGet.Core has this functionality, because it can process .csproj files.
It's not possible to add NuGet packages (eg. custom T4 files) to this new project type, because NuGet handles only the known project types. It's hard wired, see SolutionWalker.CreateProjectNode.
The only solution is to "downgrade" this standalone project type to a sub-type (aka flavor). This effects VS only, the build process doesn't care about VS extensions.
This is a BRAKING CHANGE!!!
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "...", "....csproj", "..."
<ProjectTypeGuids>{e09dd79a-4488-4ab9-8d3f-a7eee78bf432};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
As a side-effect:
<OutputPath>
and <NuBuildIncludePdbs>
properties under configuration specific property groups (eg. Debug, Release)NuBuild 1.8 only works with Visual Studio 2012 installed. I had a set-up with just VS2010 installed. NuBuild then gives the error: "C:\Program Files (x86)\MSBuild\NuBuild\v1\NuBuild.targets(51,53): error MSB4066: The attribute "KeepMetadata" in element <_SourceItemsToCopyToOutputDirectoryAlways> is unrecognized. [E:\build-output\builds\twia.validation\deployments\Twia.Validation.NuGet\Twia.Validation.NuGet.nuproj]"
Installing VS2013 did not help. Installing VS2012 resolved the error. In the environment we use NuBuild we have quite a few machines still with just VS2010 installed.
Can you compare your approach with https://github.com/davidfowl/NuGetPowerTools/issues ?
Is any advantages to use your project?
Implemented, pull request will be sent.
I have 3 different NuBuild projects in a solution. All 3 reference library projects in the same solution. For the first 2 everything is fine. For the last one I get build errors related to source code from one of the referenced projects. This might be happening for all 3 projects but I only get compilation errors in one of them. Looking at the build log the Sources property for the project is getting set to the list of source files from one of the referenced library projects (not all of them). This particular set of source files have a dependency on an assembly that isn't included in a default C# project but is part of the framework (System.ComponentModel.DataAnnotations). I cannot figure why the NuBuild project would be trying to compile the source file for a referenced project. Nevertheless this is causing a build failure.
Add the ability to specify a custom package subdirectory (ex: lib\net40, lib\net45, etc.) for each project reference in a NuBuild project. For example:
... ... lib\net45would place the project's assemblies under the lib\net45 folder in the package.
I fixed it. I will merge it with the new v1.8 and send a pull request.
It requires ReferenceOnly load of binaries in to a temporary AppDomain.
Currently, if you build a NuBuild project, it invokes the build on all referenced projects, in order to determine their targets. This is also done in the clean target, which causes referenced projects to build when cleaning. The clean target should not build referenced projects.
Implement a property page for .nuproj projects for editing project configuration
Our internal (NuGet and Install package) publishing workflow uses XML files in projects (like .nuspec) to specify the publishing parameters, it's essential to copy files next to the .nupkg file in to the Output Directory.
I started to implement it, I will send a pull request when it's ready.
Currently, NuBuild projects do not specify a TargetFrameworkVersion project property, so VS defaults this property to .NET 4.0. When adding a reference to a .NET 4.5 project, the IDE displays a warning message. The user should be able to specify the framework version in project properties, and the template should reference .NET 4.5 by default.
NuPrepare replaces only
If a solution is built using MSbuild (not Visal Studio), then tokens such as
Error: C:\Program Files (x86)\MSBuild\NuBuild\v1\NuBuild.targets(61,7): error : The replacement token 'configuration' has no value. (InvalidOperationException).
ProjectCollection.GlobalProjectCollection.LoadedProjects appears to be empty.
When: If there are no references in the project, and a replcament token such as
Error: C:\Program Files (x86)\MSBuild\NuBuild\v1\NuBuild.targets(61,7): error : Object reference not set to an instance of an object. (NullReferenceException)
I have a portable class library (PCL) project in Visual Studio 2013, and a NuBuild project for creating NuGet package releases. The two projects are configured identically to the projects in the NuBuild sample project "Replacements," except for the fact that my library is targeted towards multiple platforms, via PCL.
When I build my project, I get the following NuBuild error:
"The replacement token 'XX' has no value".
'XX,' in this case, is whatever the first replacement token to appear in my NuSpec file is.
This is when using NuBuild version 1.10, acquired from the Visual Studio Extensions Gallery.
By default NuGet pack puts the package version in the package name. For us this is very important, as we ened to be able to store multiple version side-by-side. NuBuild leaves the version out.
Proposed solutiuon is to add an option (checkbox) to the project property pages to allow adding the version to the package name, in the same way the default NuGet pack command does.
New version should supports both the .nuproj and .csproj files, emit a simple warning building .nuproj that upgrade is possible, and add "upgrade solution" and "upgrade project" menu items to upgrade .nuproj files to .csproj automatically.
Only the VS support differs between v1.x and v2.x, the MSBuild/NuBuild.targets build process is basically the same. V2.x uses project subtype, that means different GUI, but uses the same properties in .csporj files, that's why MsBuild builds them identically. The project subtype is required to be able to install NuGet packages into the NuBuild projects (eg. default/sample/project-specific .nuspec files).
If the output folder gets lost (e.g. because GIT does not deal well with empy folders) then NuBuild does not re-create the output folder on build, and the build fails with a DirectoryNotFoundException.
Hi,
if you reference a .NET 3.5 library, then the folder lib/net35 is not created, because the TargetFrameworkAttribute type is only available since .NEt 4.0
NuBuild show a warning symbol on all referenced projects (yellow triangle with !). In the error list there are no warnings or messages. The reference projects are included in the package. What does the warning mean?
Even when the Build target's Inputs and Outputs attributes are valid (NuSources and NuTargets are perfect), it always creates a fresh new package file. I can't figure out why.
Version Source set to Manual and all files referneced in element. No references to projects are needed, or even desired. Result is a failed build.
Error in Output: C:\Program Files (x86)\MSBuild\NuBuild\v1\NuBuild.targets(55,7): error : Object reference not set to an instance of an object. (NullReferenceException).
After setting <TargetFrameworkVersion>v4.5</...>
in .nuproj, when I add a .net45 project reference, VS2012 still displays a warning: "The target Framework version for the project ... is higher than the current project Target Framework Version".
When I add <TargetFrameworkMoniker>.NETFramework,Version=v4.5</...>
it works!!!
It seems to me as a bug in ProjectNode.GetProjectOptions()
, it searches for this property, instead of combining the TargetFrameworkVersion and TargetFrameworkProfile properties.
In the library project file, I have some xml files marked as content and they are not copied into the nuget package.
I would like to skip VS2012 for a number of project still on VS2010, and migrate them straight to VS2013. Please add support to install NuBuild on VS2013.
Please add support for including the XML doc file as an option like the PDB. This eliminates the need for having to add them manually.
The result is that if you have a normal net3.5- and a win8.1-assembly you get an error (duplicated uri)
When compiling the sample project I get the following error:
Error 1 The imported project "G:\OpenSource\NuBuild\Samples\Replacements\Package\NuBuild.tasks" was not found. Confirm that the path in the declaration is correct, and that the file exists on disk. (InvalidProjectFileException) C:\Program Files (x86)\MSBuild\NuBuild\v1\NuBuild.targets 55 8 Package (Replacements\Package)
Hi
I try to create solution level package and control it version manually. I try various options available in the NuBuild but any of them is relevant for my case.
I investigate the possibilities and i think the best could be us ein nu spec $vesrion$
source Library
and in the MSBuild project file set the Version
property to some value. I found that i can use the replaceable for any MSBuild property so such option available for
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.