Comments (5)
Hi,
yes, from version 2.0, NMF only supports .NET Standard 2.0 in order to avoid cross-compilation and thus simplify the code. However, .NET 4.6.1 with Visual Studio 2015 should be supported (according to https://github.com/dotnet/cli/issues/6739), but you might have to install the .NET Core 2.0 SDK.
If this absolutely does not work, I can restore the old project files and perform a cross-compilation to .NET Standard 2.0 and .NET Framework 4.0/4.5.
Best,
Georg
from nmf.
Hello Georg.
Thank you for the fast reply. Simply installing the .NET Core 2.0 SDK did not fixed the problem, but was the first step.
I installed the SDK, but got no other result than before.
https://www.microsoft.com/net/download/windows
Then I found the announcement dotnet/announcements#24. It states that at least Nuget 3.6 is needed in Visual Studio 2015 to reference a .Net Standard 2.0 library.
https://www.nuget.org/downloads
Now I got another error message:
To reference a library that targets .NET Standard 1.5 or higher, you need to install the .NET Standard Build Support extension for the .NET Framework https://aka.ms/netstandard-build-support-netfx
I installed the .NET Standard Build Support extension from the link above and got a lot of the following errors.
error CS1703: Multiple assemblies with equivalent identity have been imported: 'C:\Program Files (x86)\MSBuild\Microsoft\Microsoft.NET.Build.Extensions\net461\ref\System.Xml.XmlSerializer.dll' and 'C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework.NETFramework\v4.6.1\Facades\System.Xml.XmlSerializer.dll'. Remove one of the duplicate references.
For this I found the open issue dotnet/sdk#1539
As workaround it is suggested to set <ImplicitlyExpandDesignTimeFacades>false</ImplicitlyExpandDesignTimeFacades> in first PropertyGroup element of the project file.
I did this an now my project and also a newly created test project compiled.
But now I got a warning for each project that uses NMF-Basics 2.0.*
Warning The referenced component 'System.Net.Http' could not be found.
To solve this I found a workaround in the issue dotnet/sdk#1499 (comment).
I added the suggested lines to the end of my project file and the warning disappeared.
The second solution would be to delete the reference to 'System.Net.Http' from all projects.
Now I get the warning
warning MSB3061: Unable to delete file "[path removed]System.Net.Http.dll". Access to the path '[path removed]\bin\Debug\System.Net.Http.dll' is denied.
Visual Studio seems to block the file by itself, wehn I open the project.
This is the current status of my research how to use a .NET Standard 2.0 assembly from a Visual Studio 2015 project. Maybe this helps someone. I hope Microsoft fixes those issues. For now I will stay with NMF-Basics 1.0.99 and will change the version only when needed.
from nmf.
Oh, that looks like a lot of mess, indeed. I did not know it was that difficult to use .NET Standard with Visual Studio 2015 (I am using VS 2017 for quite some time now).
from nmf.
This should be fixed now as the latest version has support for .NET 4.5 for most runtime libraries
from nmf.
Thank you! This helps us as long as we have not switched to Visual Studio 2017 in our company.
from nmf.
Related Issues (20)
- enum values differ between model and serialization HOT 5
- GC allocations accessing INotifyEnumerable HOT 4
- il2cpp compability for unity3d engine HOT 5
- Ecore2Code does not handle multiple namespaces HOT 5
- MetaRepository can't resolve multiple namespaces with same interface HOT 3
- Code generates incorrectly for models with elements named the same as the class HOT 1
- Generated static Retrieve methods need namespace to qualify ClassInstance reference HOT 5
- Support .NET Standard? HOT 4
- Serialization: Boolean TypeConverter doesn't conform to XML standard HOT 3
- Issue loading model created in EMF HOT 4
- Running Ecore2Code on .NET core HOT 7
- Troubles loading EMF instances of an Ecore model HOT 2
- Using NMF metamodels in Unity HOT 4
- "Data at root level is invalid. Line 1, position 1." HOT 1
- Ecore2Code: Generated reference models have incorrect ModelRepresentationClassAttribute HOT 1
- Support for Extrinsic XMI IDs HOT 12
- API question: how to find all usages of an object? HOT 2
- Some names in .ecore file can cause compilation errors HOT 2
- Problem following tutorial with NMF version 2.0.176 HOT 6
- Wrong deserialization of multivalued reference properties HOT 2
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 nmf.