The first time SP Project Director encountered various problems, the following is a summary:
Problem 1. When creating an SP project, the "field solution" is different from the "sandbox solution". For details, refer to the official MSDN documentation. The following is a simple excerpt:
1) field solution: when it is carried out with w3wp.exe, its operation will affect the code of the entire site, and the w3wp.exe process can be added for debugging vs should be run as administrator ).
2) sandbox solution: the container is monitored during running. The Sandbox solution is restricted.
Question 2: When you create an SP project, the newly added class library does not know how to reference ........
Two methods:
1) GAC Registration: Right-click the project such as the class library these have registered at the beginning) Select properties-"signature 650) this. width = 650;" src = "http://www.bkjia.com/uploads/allimg/131228/20022a305-0.jpg" title = "1.jpg"/>
Create-"
650) this. width = 650; "src =" http://www.bkjia.com/uploads/allimg/131228/20022a263-1.png "title =" 2.png"/>
Then a xx is created. A key file with a strong name of snk, then, place the "Strong name key file" and "dll" files under the same folder. During my test on SP2010, even if they are not in the same folder, we can estimate the reason for the version, to be compatible with the previous SP version), open the "vs2012 command prompt" and enter the following content: gacutil-I absolute path \ xxx. dll
If the message "the Assembly has been successfully added to the cache" is displayed, the registration is successful, and the reference of the deployed SP project can be successfully executed.
Disadvantage: after each modification, the newly compiled dll must be put into the registered dll path, so it is not flexible to use.
2) register a Package:Double-click Package. Package in the package folder of the SP project,
650) this. width = 650; "src =" http://www.bkjia.com/uploads/allimg/131228/2002292141-2.png "title =" 3.png"/>
Click "advanced"-"add"-"add existing assembly"-"click" Confirm "Source Path" to select a project under the same solution.
650) this. width = 650; "src =" http://www.bkjia.com/uploads/allimg/131228/20022950B-3.png "title =" 6.png"/>
In this way, you need to deploy the SP project and the dll generated by the other project will be automatically included in the wsp for deployment.
Disadvantage: It is said that this method may not be applicable only to versions earlier than SP2010, because I only installed SP2010 and cannot verify this statement.
In the future, articles in this series will be written in SP development...
Wait for the tile 650) this. width = 650; "src =" http://www.bkjia.com/uploads/allimg/131228/2002294X6-4.gif "/>
This article is from the fish blog, please be sure to keep this source http://tongling.blog.51cto.com/3925599/1280970