assemblyinfo

Can I automatically increment the file build version when using Visual Studio?

倾然丶 夕夏残阳落幕 提交于 2019-12-16 20:16:03
问题 I was just wondering how I could automatically increment the build (and version?) of my files using Visual Studio (2005). If I look up the properties of say C:\Windows\notepad.exe , the Version tab gives "File version: 5.1.2600.2180". I would like to get these cool numbers in the version of my dll's too, not version 1.0.0.0, which let's face it is a bit dull. I tried a few things, but it doesn't seem to be out-of-box functionality, or maybe I'm just looking in the wrong place (as usual). I

Now Log4Net.config isn't being loaded as I moved my wrapper class to its own class project

爱⌒轻易说出口 提交于 2019-12-13 03:31:30
问题 Can anyone help, i have been using log4net with success i basically had a static class (wrapper) in my webproject and i load my config from external file called log4net.config by adding this in assemblyinfo.cs // log4net config file [assembly: log4net.Config.XmlConfigurator(ConfigFile = "Log4Net.config", Watch = true)] All good!, now i decided to move my static class to its own class project so i can share my static class (wrapper) with other projects. The log4net.config is still in the

How to get the AssemblyVersion of a .Net file in Linux

房东的猫 提交于 2019-12-10 12:28:56
问题 Is there any way to obtain the AssemblyVersion of a .Net executable in Linux without using mono? What I am trying to have is a script or command that will let me obtain the AssemblyVersion on Linux boxes. I tried: #strings file.exe | grep AssemblyVersion but it only the string and not the number. Also checked with: #file file.exe but only got general information. Any ideas? 回答1: Try to match version numbers that span a whole line: $ strings file.exe | egrep '^[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+$'

How can I generate a custom build number in TeamCity and then patch it to assembly info?

孤人 提交于 2019-12-04 14:44:39
问题 I have done some searching on this topic and am able to find individual solutions to generate custom build numbers as well as patch assembly info, however I am unable to accomplish both. When using a custom POWERSHELL script that I found in a search, I am able to set the build number to what I create with the script, however this build number does not patch. The only success I have in patching is when using set numbers plus a counter. But the number that the POWERSHELL script creates does not

Should AssemblyInfo.cs be placed in version control?

人盡茶涼 提交于 2019-12-04 07:50:19
问题 I have an automated build system using CruiseControl. I am using the SvnRevisionLabeller to to get the version string to use. With this string I can use nant to update AssemblyInfo.cs so when I build it has the correct build string. I can also use this CC label to tag the subversion repository. So everything is aligned - CCNet Build label - Executable (Assembly Information) - Version Control (subverson tag) Now where I have a problem is if I want to try to rebuild an old image from the

What is the ThemeInfo attribute for?

和自甴很熟 提交于 2019-12-03 14:35:53
问题 Whenever I create a new WPF application or WPF user control library, the AssemblyInfo.cs file includes the following attribute: [assembly: ThemeInfo( ResourceDictionaryLocation.None, //where theme specific resource dictionaries are located //(used if a resource is not found in the page, // or application resource dictionaries) ResourceDictionaryLocation.SourceAssembly //where the generic resource dictionary is located //(used if a resource is not found in the page, // app, or any theme

Do I need AssemblyInfo while working with .NET Core?

ⅰ亾dé卋堺 提交于 2019-12-03 09:19:13
问题 Previously, AssemblyInfo.cs file was autocreated by Visual Studio to contain assembly-wide attributes, like AssemblyVersion, AssemblyName and so on. In .NET Core and ASP.NET Core, project.json is responsible for holding most of that information. So the question is: do I need to mark my assemblies with that attributes anymore? What traps can I get in if I will not mark assembly with that attributes? 回答1: project.json has replaced the AssemblyInfo . AssemblyVersionAttribute is replaced by

How can I generate a custom build number in TeamCity and then patch it to assembly info?

会有一股神秘感。 提交于 2019-12-03 09:12:27
I have done some searching on this topic and am able to find individual solutions to generate custom build numbers as well as patch assembly info, however I am unable to accomplish both. When using a custom POWERSHELL script that I found in a search, I am able to set the build number to what I create with the script, however this build number does not patch. The only success I have in patching is when using set numbers plus a counter. But the number that the POWERSHELL script creates does not persist to an extent that the Assembly patcher can work with. Am I doing it wrong? I finally solved it

Visual Studio 2017 and the new .csproj InternalsVisibleTo

若如初见. 提交于 2019-12-03 05:32:14
问题 Where do I put InternalsVisibleTo from AssemblyInfo in the new Visual Studio 2017 .csproj project file? 回答1: To clarify Hans Passant's comment above, you simply have to add InternalsVisibleTo to any cs file in your project. For example, I created an AssemblyInfo.cs file in the root of the project and then added the following content (only): using System.Runtime.CompilerServices; [assembly: InternalsVisibleTo("DynamicProxyGenAssembly2, PublicKey=<ADD_KEY_HERE>")] 回答2: Just in case anyone would

What is the ThemeInfo attribute for?

霸气de小男生 提交于 2019-12-03 04:20:02
Whenever I create a new WPF application or WPF user control library, the AssemblyInfo.cs file includes the following attribute: [assembly: ThemeInfo( ResourceDictionaryLocation.None, //where theme specific resource dictionaries are located //(used if a resource is not found in the page, // or application resource dictionaries) ResourceDictionaryLocation.SourceAssembly //where the generic resource dictionary is located //(used if a resource is not found in the page, // app, or any theme specific resource dictionaries) )] What is this ThemeInfo attribute for? Will I break anything if I remove it