VS2017 Setup project for .NET 4.7.2 - deployment

Having configured a Setup project for my .NET 4.7.2 codebase the Detected Dependencies shows up with a netstandard.dll.
Is there anyway to tell where this might be coming from?
Again it's just an entire 4.7.2 based code with that target Framework chosen.
The Prerequisites Page has the 4.7.2 chosen and the Launch condition has 4.7.2.
What could be causing the netstandard.dll to be included in the project output?

What could be causing the netstandard.dll to be included in the
project output?
First, thanks to magicandre1981 for all his help.
You have referenced a net standard nuget packages in your Net Framework 4.7.2 project. And because of the special nature of the package, it needs to refer to netstandard.dll as a runtime environment.
Although Net Frameowork 4.7.2 optimizes the build output file, so netstandard.dll cannot be shown in the project outputpath, but in fact the project will still use it at runtime.
But for the setup project, there is no such feature. Using the netstandard nuget package, all references will be displayed in Detected Dependencies including netstandard.dll.
In addition, Net Standard 2.0 is compatible with Net Frameowork 4.7.2, and you can refer to this document.

Related

How do you setup Visual Studio for Mac and NUnit

I am using Visual Studio for Mac version 8.5.4 (build 12) and I used NuGet to install Nunit package. I can create a Project NUnit but when I attempt to reference my project I want to test I can't choose my project because it says the .Net target framework is incompatible.
When I added the NUnit project it asked me to pick the target framework and only gave me the option of 2.0, 3.0 and 3.1. Even when I change my project down to 3.1 it still says it's incompatible.
How do you setup Visual Studio for Mac and NUnit
Edit: .Net Standard
Edit 2: I was WRONG. I was using .Net Core and .Net standard together and that was the problem. Thank you everyone.
I was using .Net Core and .Net Standard when I wanted to use .Net Standard for everything.

Adding Prism reference in Xamarin PCL project breaks build on Windows Phone 8.1 and UWP

I'm using some of core Prism classes in PCL Project for Multi-platform app. Everything Is fine (I chcecked only on Android as I don't have a Mac) until I add Windows Phone 8.1 or Universal Windows 10 Project and configure them like Xamarin website tells. What I receive is:
Cannot resolve Assembly or Windows Metadata file 'Prism.dll'
Type universe cannot resolve assembly: Prism, Version=6.1.0.0,
Culture=neutral, PublicKeyToken=91a96d2a154366d8.
When I remove all Prism related thing from PCL the projects build, so I'm considering copying prism project into my solution. Or maybe should I reference Prism as a dll instead of nuget or what?
I always thought that nuget takes the job of picking the dll with proper target.
Edit: Xamarin.Froms ver: 2.0.0.6490 (in all projects now) VS 2015.
You can't use the current NuGet packages if using UWP because NuGet will add the wrong assemblies to your Xamarin.Forms project. NuGet doesn't know you are using a Xamarin.Forms app and adds the wrong assemblies. You need to add the references manually.
See this issue: https://github.com/PrismLibrary/Prism/issues/376

How can I add libraries to Xamarin Mono for Android project in VS2010?

I am working on a mono for Android application (my very first) that consumes a web api. In the documentation at xamarin.com there are examples on using different libraries such as RestSharp and Json.Net.
However, when I try to install these libraries via Nuget in my VS2010 project it failes with the following message:
Install failed. Rolling back... Could not install package
'Newtonsoft.Json 4.5.9'. You are trying to install this package into a
project that targets 'MonoAndroid,Version=v2.2', but the package does
not contain any assembly references that are compatible with that
framework. For more information, contact the package author.
How can I include such libraries in my project?
Thanks in advance.
Erwin
This error message indicates those libraries are not compatible with Mono for Android. You should ask the manufacturer of the libraries if they have a MfA compatible version. If you have the source code of the libraries you could also try to make a MfA library, using linked source files, yourself.
Not sure if you've tried this but if you're using xamarin studio and right click the component folder in your Android app project choosing add component should be able to solve your problem. This will add a reference to the component that is added. Components seem like they are mono compatible packages and what's good for your case is that there are components for both RestSharp and Json.Net:
https://components.xamarin.com/view/restsharp
http://components.xamarin.com/view/json.net/

Entity Framework 4.3 Multi-project installation

I'm confused with regards to my code using latest Entety Framework.
I have 2 projects in the solution. I've used t4 templates to generate Self-Tracking Entities.
In project #1 I have just .edmx files and Entety Framework 4.3 installed thru NuGet PM. Now my second project has template-generated Context classes. So how do I make sure my second project also uses EF 4.3? Do I need to install it separatly for every project in my solution or can I just reference EntityFramework.dll? Thanks.
The Entity Framework package installation is project specific. I'd install it separately, so NuGet can manage the references.
To manage the package installation for multiple projects, open NuGet PM for Solution with
"Tools->Library Package Manager->Nuget Package Manager for Solution..."
Go to the Installed tab (or Online), select EntityFramework and click Manage. Check/Uncheck the projects where to install EntityFramework.
Or, in the console pass the -ProjectName property to the install-package command.

Referencing a .net 3.5 version of a nuget package from a .net 4 project

I want to make my .net 4 project load the .net 3.5 version of a nuget package so that other .net 3.5 references don't get the nuget dll overwritten in the output directory.
Yikes! If the package has a .NET 3.5 and a .NET 4 version of the DLL, there's no real way to do that other than changing your project to target 3.5 itself.
I can think of a couple of workarounds though. They're not ideal, but they'd probably work.
After you install the nuget package, go into the "packages" directory (it'll be next to your solution (.sln) file. Find the package. Delete the "\lib\net40" folder. This way, NuGet will reference the next version down. You'll have to manually change the assembly reference. Note if you even upgrade this package, you'll have to do this again.
You could create a custom version of this package that only contains your 3.5 version of the DLL. Perhaps put this up in a custom feed at http://myget.org/ and install it from there.
One of those ought to work.