1: Problem with file namespace
Namespaces for XAML files and Model.cs files
2:csproj
So who is it for? That's for development tools, such as the one we're familiar with in visual Studio, and the MSBuild.exe that you can never touch, but should have heard about. Visual Studio manages project files and related other kinds of very rich data and operations based on the XML definitions in csproj, and MSBuild also learns from the csproj file which dependencies, default output paths, are required to compile the project. What actions are required for pre-build and post-build, and so on. Both Visual Studio and MSBuild are development tools, which is the only meaning that csproj exists: providing information for the development environment. And in the running environment, no one at all (operating system? Care about the so-called csproj file-the "where the program comes from".
If it is an executable program, the operating system needs only exe,dll, or even configuration files or resource files, rather than csproj,sln,dbproj, etc., that are important in development. The environment, like IIS, does not pay much attention to the shadow of Csproj: "What is csproj?" "I'm only listening to Web. config," says IIS scornfully. In the running environment, Csproj's splendor is not--it is natural that you have a way to prove to our IIS that the DLL it uses was "led" by files such as Csproj,sln during the development period? Now speaking of the "PDB file needs to be placed in the debug directory to be effective", it is not. The Debug directory is just the directory generated by the "default" compilation rule for the VS template, and we can use the PDB file for debugging to specify the directory where the PDB file exists--even if we don't need vs at all to use the PDB file.
Speaking of "template", this is actually the concept of "development environment". When we select new Item or new project in VS, we can find the category of the template on the left side of the conversation window, while the other side is a bunch of available templates. Where did these templates come from? Naturally generated for VS, you might want to see if there are some zip files in your My documents\visual Studio 2008\templates directory, which is the compressed package that holds "My Templates". Interested friends can learn how to create a template. In the run and web Sit environment, you will not know what templates are used in development. I wonder if you ever mentioned the question: "Why is ASP. NET AJAX not available in Web site, and Web application is OK?" "Now you should know that there is no relationship between the run-time problem E, the Web application, or not. So how does this matter? Have a look at your Web. config? See what information is prompted on the page? Use Fiddler to see what the output of the request is? In fact, in many cases "wrong" and there is no magic bullet, only "careful" two words.
And in fact, the "template" in the development environment "status" is lower than the csproj file, because as long as the template after the creation of good content, there is no way to explain the results and their own relationship. For example, we use a template to create a AjaxControlToolkit extender, which generates a. cs, a. designer.cs and a JS file--Oh, who can prove that these three files were not created manually? This is the "development environment", everything is designed to improve the efficiency of development, all in order to be able to eventually produce an executable binary file. And after the last member of the development environment, "compiler" work is done, all development tools are silently relegated to the second tier.
VS compilation Error The name ' InitializeComponent ' does not exist in the current context in WPF application