Comments (6)
There doesn't appear to be a reliable way of distinguishing references to the .NET 3.5 framework from .NET 2.0. As a workaround for 3.5 projects, you may have to include these libraries using the element in the nuspec instead of project references.
from nubuild.
Maybe to set default value to .NET 3.5 if no TragetFramework found would help, because in .NET 2.0 are not so many new applications.
And in case if some want to target .NET 2.0 he/she can do the work around you suggest.
from nubuild.
On other idea is to get that information from the visual studio dte object.
from nubuild.
You could also argue that the default should be .NET 2.0 if no TargetFrameworkAttribute is found in the referenced assembly. Feel free to fork the project and add set the folder name default there.
I'm not sure that going through the DTE would work when building through MSBuild. Thoughts?
from nubuild.
You can also set to .NET 2.0 :-) but i think either 2.0 or 3.5 should be set. (better then nothing)
And accessing dte durning build i alos do not know very well.
But to solve the problem reliable would be to write two small applications one wich is build with trageting framework 2.0 and one with 3.5. Then try to load the dll dynamically into both applications and if load succedd only in 3.5 application then you know ist 3.5 and if both succeed then you know it is 2.0. ;)
from nubuild.
The point is that arbitrarily setting the folder name to either would be incorrect for some use cases and would violate the principle of least surprise. I'd rather leave the target in the lib folder when the target framework can't be determined reliably.
from nubuild.
Related Issues (20)
- Net3.5- and Win8.1-Assemblies are not moved to subfolder HOT 2
- MSBUILD on TFS throws Null-Ref-Exception HOT 2
- (v2.x) Create upgrade path from v1.x to v2.x
- Cleaning a NuBuild project builds its dependencies HOT 3
- Change encoding of .nuspec file to UTF-8
- VS2013 (PCL project); "The replacement token 'XX' has no value" HOT 1
- Add support for XML doc file
- Build tries to recompile source from referenced projects
- Items marked as content are not added to the nuget package
- Custom version HOT 1
- Can't add Linked files to nuget package? HOT 1
- Question: Executing nuget package build on specific VS configuration only
- NuBuild in Visual Studio 2015 preview HOT 11
- A schema definition for NuGet specifications suitable for use with Visual Studio's IntelliSense.
- Merge with NuProj HOT 2
- Vs2015 support HOT 7
- Multiple packages on same solution HOT 2
- Directly add nuget.org package references? HOT 1
- Request VSIX install and not an MSI HOT 1
- Nubuild in VS 2010 - Why is it looking into "obj\Debug\..."? The artifacts for the Schema project are generated into "bin\Debug\..."
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from nubuild.