.net-assembly

How to change assembly info in asp.net core?

拥有回忆 提交于 2019-12-07 03:09:58
问题 I want to versioning my asp.net core app. I followed this link: http://www.matthiaseinig.de/2013/05/20/auto-generate-fileversion-for-all-projects-in-a-solution-with-t4/ , but I want to remove project assembly info, but I didn't find it. How to remove duplicated assembly info? I want to override asp core assemblies with another file. BETTER SOLUTION After a while I realize that the best solution is to use a T4 file, the version is incremented automatically after each build. look here: http:/

How to use a Roslyn scripting submission as an assembly in other Roslyn compilations

ぃ、小莉子 提交于 2019-12-07 02:50:25
问题 I'd like to reuse a script as a dynamic assembly in another non-scripting Roslyn compilation, but I can't for the life of me figure out how to make that work. For example, say a I create a script the normal way and then emit the script as an assembly to a byte stream using something like: var compilationOptions = new CSharpCompilationOptions(OutputKind.DynamicallyLinkedLibrary); var compilation = script.GetCompilation().WithOptions(compilationOptions); using (var ms = new MemoryStream()) {

.Net 4.6 website not loading Reference Assemblies correctly

天大地大妈咪最大 提交于 2019-12-06 17:11:09
问题 I have a web project in Visual Studio 2013, including several library projects. Problem is that adding a reference (ie. System.Collection, System.Net) to the web project is being added as a 'Reference Assembly' from C:\Program Files (x86)\Reference Assemblies\Microsoft , when loaded in IIS it is not correctly loading the implementation of the assembly (from GAC). Example error follows. [BadImageFormatException: Cannot load a reference assembly for execution.] [BadImageFormatException: Could

“Can't find the .NET assembly {AssemblyName} in specified folders”

霸气de小男生 提交于 2019-12-06 16:06:33
I am simply trying to load sln files in to Visual NDepend and keep getting this error: Can't find the .NET assembly {AssemblyName} in specified folders. Has it been compiled properly? Is the NDepend project missing the containing folder of the .NET aseembly? The weirdest thing is that this error doesn't occur for the same assemblies under a different path. For example: The error won't occur in assemblies under the path C:\code\depot\Product\Stage\IA\ , and will occur under C:\code\depot\Product\IA The steps I am taking while using Visual NDepend: Open NDepend Click on Analyze VS solutions and

What is the structure of the public key of a signed assembly in C#?

你说的曾经没有我的故事 提交于 2019-12-06 13:51:48
问题 Using this code to retrieve the public key bytes... var pubKey = AppDomain.CurrentDomain.DomainManager.EntryAssembly .GetName().GetPublicKey(); What is this common structure at the start (first 32 bytes) of the key? It's not ASN.1 and it might not be variable. I can google it and get repeats. // 00 24 00 00 04 80 00 00 94 00 00 00 06 02 00 00 00 24 00 00 52 53 41 31 Is it all reversed or just part of it (e.g. the modulus at the end)? 52 53 41 31 is a string of RSA1 . My key's modulus is 1024

Unknown build error, 'Could not load file or assembly 'System.Windows

假如想象 提交于 2019-12-06 12:06:19
I am trying to build a test project for silverlight application. When i build this project it throws following error Unknown build error, 'Could not load file or assembly 'System.Windows, Version=5.0.5.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)' I have system.winwos dll in my references and i am using visual studio 2012. What should i do to resolve this error More Details: If I remove system.windows.control.Navigation dll, this error no

Should assembly guid attribute vary for different target framework builds of the same .NET library?

China☆狼群 提交于 2019-12-06 11:54:45
问题 I am developing a .NET library in C# which has to address a wide set of target frameworks. I want to produce a nuget package that would install correctly according to the settings of the target project. In order to achieve that, I am using multiple .csproj files. Each of them is addressing a particular target framework (for example MyLibrary.net45.csproj would create the binaries in bin/*/net45 , MyLibrary.netstandard1.2.csproj would create the output in bin/*/netstandard1.2 , and so on).

Dynamically Loaded Assembly - Settings & Communication

筅森魡賤 提交于 2019-12-06 10:43:14
问题 Ok so... I have a WPF application (let's call it Launcher.exe ) which loads and executes another WPF application (let's call it Loaded.exe ) dynamically using something like this: Byte[] assemblyData; using (BinaryReader reader = new BinaryReader(new FileStream(filePath, FileMode.Open))) assemblyData = reader.ReadBytes(Convert.ToInt32(fs.Length)); Assembly assembly = Assembly.Load(assemblyData); MethodInfo method = assembly.EntryPoint; if (method != null) { Object instance = assembly

Reference Assemblies folder and different assemblies with the same version

左心房为你撑大大i 提交于 2019-12-06 10:12:42
I have a project that uses System.Runtime.Serialization assembly. I am using the type DataContractSerializer from that assembly, but I have a problem. There are two assemblies: C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework.NETFramework\v4.0\System.Runtime.Serialization.dll C:\Windows\Microsoft.net\Framework\v4.0.30319\System.Runtime.Serialization.dll Both of them have the same version - v4.0.30319. The first one have 429kb size, and the second one 1037kb. I used reflector to see the list of classes, and the first one doesn't have the class that I need (

Could not load file or assembly 'Microsoft.Office.Interop.Excel'

笑着哭i 提交于 2019-12-06 09:03:13
I'm having a problem using Excel in my WinForm application. When I try it on several computers it works just fine on them, but when I try it on another computer it gives me the 'System.IO.FileLoadException: Could not load file or assembly' error. I've added a reference in my project ('Microsoft.Office.Interop.Excel') and even set 'Copy Local' to true. I don't know why this is happening because all computers use the same office version(Office 2007 = Version 12). Anyone has an idea? thanks, Udi You might want to check the reference in the .csproj file to make sure that the DLL is being