How do I 'embed' a manifest in an assembly using VS2005? - visual-studio-2005

Using VS2005, how do I 'embed' a manifest in an assembly?

Here is the link that will help you to 'embed' a manifest in an assembly in VS2005
Link

Related

Using net5.0 in T4 templates in Rider

I'm a little confused about compatibilities between netstandard, netframework, netX and how mono fits into the picture...
I understand that Rider's T4 engine runs on mono, but does that mean I can't use net5.0 assemblies in my T4 templates?
Currently, I have a net5.0 project, referencing net5.0 nuget assemblies.
In my T4 templates, I'm referencing the assembly DLLs in bin/Debug/net5.0 with `<# assembly name="...">
When I run the T4 templates in-proc in a net5.0 Console Application via Mono.TextTemplating.TemplateGenerator.TemplateGenerator, then the templates work.
However, if I right-click a template in the Solution explorer and select 'Run Template', I get a list of errors that core System.* libs are missing, e.g.
Generate.tt(21, 25): [CS0012] The type 'Object' is defined in an assembly that is not referenced. You must add a reference to assembly 'System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'.
Is this a bug in Rider?
Due to implementation details, Rider compiles T4 files targeting a version of .NET Framework, that's why it has problems with files referencing net5.0 assemblies. As far as I understand what I see in Mono.TextTemplating, they target the runtime they are launched in instead. To solve your problem I'd suggest trying Mono.TextTemplating as a command-line tool - it might be able to compile files with net5.0 references. To integrate that external tool into Rider, you can go to File > Settings > Tools > Custom Tools, disable Bundled T4 Template Executor and add a custom tool for Mono.TextTemplating CLT.
To answer your question: yes, it probably can be called a bug

Wrong FSharp.Core version looked for in a Xamarin.Forms project

In a Xamarin.Forms project I am getting an error on Windows 8.1 and UWP:
Could not load file or assembly 'FSharp.Core, Version=3.259.3.1, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference.
The actual version of F# used throughout the solution is 3.7.4.0:
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
<TargetFrameworkProfile>Profile7</TargetFrameworkProfile>
<TargetProfile>netcore</TargetProfile>
<TargetFSharpCoreVersion>3.7.4.0</TargetFSharpCoreVersion>
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
There is an F# PCL project and C# platform-specific projects. The error occurs only when using F# libraries from Nuget in the PCL. These packages tend to use:
<TargetFSharpCoreVersion>3.259.3.1</TargetFSharpCoreVersion>
I have tried the following, but they do not change the error:
Putting an app.config file with a binding redirect to 3.7.4.0 in the F# project and/or the build directory
Installing the FSharp.Core Nuget package into all projects
Very grateful for any help.
Edit: in the original question there was an incompatibility between the profile (111) and the intended TargetFSharpCoreVersion (3.7.4.0) which was causing additional issues.

Mistaken prism assembly reference in visual studio

I am using prism and I get an exception that: The type 'Microsoft.Practices.Prism.Bootstrapper' is defined in an assembly that is not referenced. You must add a reference to assembly 'Microsoft.Practices.Prism.Composition, Version=5.0.0.0, Culture=neutral, PublicKeyToken=null'
the problem is that I already have an assembly reference to Microsoft.Practices.Prism.Composition in my project
any help? thanks
It seems Microsoft.Practices.Prism.UnityExtensions need a reference to Microsoft.Practices.Prism.Composition assembly.
Just download Prism 5.0 for WPF, compile the source code of ModularityWithUnity.Desktop.sln at \Source\Quickstarts\Modularity\Desktop\ModularityWithUnity and copy all Prism assemblies from bin\Debug directory and paste it in your app's location.
This fixed my same problem.

Visual Studio referenced assembly CopyLocal doesn't work

I have a Console application and a Class Library in a solution. Whenever I reference class library from console application it finds it but after building the solution it cannot find the type.
Although CopyLocal is set to true but the referenced assembly is not copied !
The reason was my console application target framework was Client Profile. Changing it to .NET 4.0 resolved the problem.
Is the referenced assembly in the Global Assembly Cache? Assemblies that are installed in the GAC are not copied to the output folder, even when CopyLocal is true.

VS2005: Assembly '<assembly>' is incorrectly specified as a file.

I've added a reference to the log4net assembly dll to my project.
When I build I get a warning saying:
Warning Assembly 'Lib\log4net.dll' is
incorrectly specified as a file.
I look up the help for this error on MSDN, and it says:
This warning is generated during
application manifest generation when
the build process detects that a file
reference is actually a (managed or
native) assembly.
This is exactly what I'm doing; the file reference is an assembly. What am I being told here?
How do I add a reference to an assembly dll, while not adding a reference to an assembly dll?
Try setting the Build Action property of the source DLLs to None. It solved the issue for us.
I was running into this problem myself.
This is what worked for me:
I had added an assembly as a reference and as an "Existing Resource." Deleting the file from the Solution Explorer, closing, then reopening the project worked.

Resources