assemblyinfo

Getting assembly name

爱⌒轻易说出口 提交于 2019-11-26 23:57:09
问题 C#'s exception class has a source property which is set to the name of the assembly by default. Is there another way to get this exact string (without parsing a different string)? I have tried the following: catch(Exception e) { string str = e.Source; //"EPA" - what I want str = System.Reflection.Assembly.GetExecutingAssembly().FullName; //"EPA, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null" str = typeof(Program).FullName; //"EPA.Program" str = typeof(Program).Assembly.FullName; //

“LNK2022: metadata operation failed” driving me insane

匆匆过客 提交于 2019-11-26 23:01:07
问题 I have a big solution with lots of projects, using VS2008 SP1, and at least once a day I encounter the LNK2022 error. If I do a full rebuild of the solution it builds fine, but this is not fun. It happens when a dependent DLL is changed 'insignificantly' (i.e. without changing any methods or classes), and the referencing project is later built. It fails when merging the metadata - whatever that means. First thing to note is that the shared DLL is referenced with #using from multiple .CPP

How can I change AssemblyProduct, AssemblyTitle using MSBuild?

余生颓废 提交于 2019-11-26 15:47:45
问题 I have an MSBuild script which compiles my existing solution but I'd like to change some properties of one of the projects within the solution at compile-time, including but not limited to AssemblyProduct and AssemblyTitle. Here's a snippet of my build script: <Target Name="Compile" > <MSBuild Projects="..\MySolution.sln" Properties="Configuration=MyReleaseConfig;Platform=x86" /> </Target> I've got one main executable and several DLLs that are compiled. I am aware of the MSBuild Extension

Equivalent to AssemblyInfo in dotnet core/csproj

岁酱吖の 提交于 2019-11-26 14:58:01
Since dotnet core moved back to the .csproj format there is a new autogenerated MyProject.AssemblyInfo.cs which contain among other. [assembly: AssemblyCompany("MyProject")] [assembly: AssemblyVersion("1.0.0.0")] Note that this is automatically regenerated every build. Previously the file was found in the /obj/ directory, now it appears to be only in memory as the file can't be found on disk and clicking the error message does not open any file. This is the error message: Since they are defined there I can't define them myself in the classical AssemblyInfo.cs . Where/how can I define the

Equivalent to AssemblyInfo in dotnet core/csproj

不想你离开。 提交于 2019-11-26 04:06:49
问题 Since dotnet core moved back to the .csproj format there is a new autogenerated MyProject.AssemblyInfo.cs which contain among other. [assembly: AssemblyCompany(\"MyProject\")] [assembly: AssemblyVersion(\"1.0.0.0\")] Note that this is automatically regenerated every build. Previously the file was found in the /obj/ directory, now it appears to be only in memory as the file can\'t be found on disk and clicking the error message does not open any file. This is the error message: Since they are