MITCHELL
✅ Issue with Sdk Targeting Multiple Frameworks
Ok. So the csproj, I attached in the beginning of our conversation was the sdk's csproj. It is dependent of another sdk which I probably incorrectly named as MY as well. (Lets name that MY2). MY2 has been branched off and created as two separate sdk's which is dependent on the target framework (.net 6 and .net 8). Both sdks have been tested with different apps.
Now, the sdk I'm trying to use, targets multiple target framework, as well as references the required packages dependent on the target framework. (as per attached csproj). BTW - there is no where in the csproj that is referencing System.Runtime (I've noticed there is a assembly as well as a nuget version of the same name)
We use the two commands to build and publish to the nuget
- dotnet build ./MY.csproj /p:Version=$CI_COMMIT_TAG --output out
- dotnet nuget push out/$PACKAGE_NAME.$CI_COMMIT_TAG.nupkg --source MY
When I add the MY sdk to a .NET 6 app, it is somehow referencing the System.Runtime version 8.
67 replies
✅ Issue with Sdk Targeting Multiple Frameworks
Firstly, sorry for my ignorance. The publishing of nuget packages is quite new to me, especially when it comes to debugging issues. Secondly, are you saying that the app that is referencing the sdk is the problem? It might be bringing in something that it shouldn't? If that is the case, why would it work with a single target nuget packag.
67 replies