Comments (3)
What is the TFM of your console application?
from msbuildsdkextras.
The TFM is set to net6.0-windows
.
I made a Multi-Target library and referenced it to a net6.0
library that is also referenced in my console application.
So I think the issue was on my side that I used it wrong.
I had to reference the Multi-Target library in my net6.0-windows
app and pass it with an interface to the .net6-0
.
This is the correct and only way because the net6-0
library doesn't know the OS. Is this assumption correct?
from msbuildsdkextras.
It was 100% on my side. I mixed up some things in my head. 😅
If someone comes across the same "problem", this is the solution to it.
To give you a little bit of context. The idea is to create a multi-target library that is able to work with the .net6.0
TFM. What I do here is to separate android
, linux
and windows
. Android
is easy because there is a TFM for it. For linux
and windows
I use a separate configuration. Default will be windows
.
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFrameworks>net6.0;net6.0-android</TargetFrameworks>
<LangVersion>Preview</LangVersion>
</PropertyGroup>
<ItemGroup>
<Compile Remove="Platforms\**\*.*" />
<None Include="Platforms\**\*.*" />
</ItemGroup>
<ItemGroup Condition="$(TargetFramework.Contains('-android'))">
<Compile Include="Platforms\Android\**\*.cs" />
</ItemGroup>
<ItemGroup Condition="!$(TargetFramework.Contains('-android')) and ($(Configuration) == 'Debug' or $(Configuration) == 'Release')">
<Compile Include="Platforms\Windows\**\*.cs" />
</ItemGroup>
<ItemGroup Condition="!$(TargetFramework.Contains('-android')) and $(Configuration.Contains('-Linux'))">
<Compile Include="Platforms\Linux\**\*.cs" />
</ItemGroup>
</Project>
from msbuildsdkextras.
Related Issues (20)
- SDK folder for UAP not found HOT 2
- Update to Microsoft.NETCore.UniversalWindowsPlatform 6.2.12 HOT 2
- Per-RID project is only built once when referenced from another (non-Extras) project HOT 1
- MSB4057: GetCopyToPublishDirectoryItems missing for per-RID project
- Support Xamarin.Mac FullFramework projects
- Azure DevOps Unable to find package MSBuild.Sdk.Extras HOT 6
- Does Xamarin.iOS10 use IOS14 SDK? Is there a list of all the supported TFMs
- Unable to add reference to netstandard through Visual Studio UI
- Failures with GetDirectoryName HOT 1
- NET6_0 constants not properly defined HOT 3
- Visual Studio 2019 hangs when loading project using MSBuild.Sdk.Extras HOT 1
- Could not use with F#
- VS2022 Preview 5 Mac - unable to find the SDK (SDK not found error) HOT 2
- NETFX_CORE not working with the latest version
- MSBuild.Sdk.Extras cannot build the TargetFrameworks Xamarin.iOS and net6.0-ios together HOT 6
- Is it possible to build a different output for the same TargetFramework
- UWP references fail when setting TargetPlatformMinVersion HOT 1
- Readme references a site sporting a database error.
- The name 'InitializeComponent' does not exist in the current context 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 msbuildsdkextras.