標籤:sn c# gacutil
右側欄 project 下properties 點中 再把output改成 class library 會在 ..\bin\Debug 下產生 .DLL 檔案
設定 set up startup project 設定成啟動工程
C:\Windows\Microsoft.NET\Framework\v4.0.30319 下的csc.exe 就是 c#的編譯器
using System; public class Helloworld{ public static void Main(string[] args) { Console.WriteLine("Hello World"); Console.WriteLine("Enter any key to exit..."); Console.Read(); }}
developer Command Prompt for vs2012.exe 工具
1.C:\Program Files (x86)\Microsoft Visual Studio 11.0> csc /?
---csc的用法
2.C:\Program Files (x86)\Microsoft Visual Studio 11.0>csc /t:exe /out:C:\Users\jz9
1129\Documents\Visual Studio 2012\temporary\helloword.exe C:\Users\jz91129\Docum
ents\Visual Studio 2012\temporary\helloworld.cs
Microsoft (R) Visual C# Compiler version 4.0.30319.18408
for Microsoft (R) .NET Framework 4.5
Copyright (C) Microsoft Corporation. All rights reserved.
error CS2001: Source file ‘Studio‘ could not be found
error CS2001: Source file ‘2012\temporary\helloword.exe‘ could not be found
error CS2001: Source file ‘C:\Users\jz91129\Documents\Visual‘ could not be found
error CS2001: Source file ‘Studio‘ could not be found
error CS2001: Source file ‘2012\temporary\helloworld.cs‘ could not be found
warning CS2008: No source files specified
C:\Program Files (x86)\Microsoft Visual Studio 11.0>csc /t:exe /out:C:\cstemp\he
lloworld.exe C:\cstemp\helloworld.cs
Microsoft (R) Visual C# Compiler version 4.0.30319.18408
for Microsoft (R) .NET Framework 4.5
Copyright (C) Microsoft Corporation. All rights reserved.
C:\Program Files (x86)\Microsoft Visual Studio 11.0>
可見 路徑裡面不可以有空格
3.>ildasm --反編譯.net的exe和dll檔案
4.> sn /? 產生一對公開金鑰私密金鑰對
在工程--> properties 中 signing --> browser-->加入產生的snk
5.c:\windows\assembly 電腦上所有的公用assembly
6.homework
--Strong name an assembly
--Add to GAC
參考資料:
http://www.cnblogs.com/lly001001/archive/2012/05/24/2515930.html
https://msdn.microsoft.com/en-us/library/ex0ss12c(v=vs.110).aspx
c# 01/26/2015