The first SP project director encountered various problems, the following is a summary:
Question 1. When you create an SP project, there is a difference between "farm solution" and "sandbox solution", and you can see the MSDN official documentation, which is summarized here:
1 Field Solution: In the hosting and W3WP.exe, its running will affect the whole field of code, and can attach W3WP.exe process to debug (vs to Run as an administrator).
2 sandboxed Solution: Load and SPUCWorkerProcess.exe, so restart the IIS application pool and IIS server do not need to restart, does not affect the code of other fields, and the sandbox is monitored, the runtime is accurately monitored SPUCWorkerProcess.exe 。 Here are the limitations of the sandbox solution.
Question 2. The New class library does not know how to reference when you create an SP project.
Two ways:
1 GAC Registration: Right click on items (such as class library These first wood has registered) Select attributes-"signature"
New-"
It then creates a strong-named key file for Xx.snk, and then puts the strong name key file and the DLL file under the same folder (when I test on SP2010, I can estimate the reason for the version even if it's not in the same folder). To be compatible with the previous SP version, then open the vs2012 command prompt and enter the content: gacutil-i absolute path \xxx.dll
When prompted that the Assembly has been successfully added to the cache, it means that the registration has succeeded, and then the SP project is deployed and the reference can be executed successfully.
Disadvantage: Every time you modify the new compiled DLL into the registered DLL which path, so use is not very flexible.
See more highlights of this column: http://www.bianceng.cnhttp://www.bianceng.cn/web/sharepoint/