I would like to follow ASP.NET 5 solution structure from here https://gist.github.com/davidfowl/ed7564297c61fe9ab814
How do you create actual physical folders in Visual Studio 2015 RC solution? How do you create for example "tests" folder, that is physically at the same level as "src" folder created by default with a new ASP.NET 5 website project? And, of course, I would like to be able to place projects into it.
There is a solution:
Create "Solution folder" named "tests". This will create logical folder, but not physical one.
Right click to the solution folder and open a new project dialog. But before you click OK, you have to change a project location to your desired physical folder and VS will create it and place the project inside.
This is not very intuitive, but it works.
Related
I have a solution with several projects. One of these projects is a "Web Site" I need to convert into a "Web App", following the steps outlined at http://msdn.microsoft.com/en-us/library/aa983476(v=vs.100).aspx
Those steps create the web app as a new project, instead of replacing the old one. Now that I have the Web App working, I need to replace the old one, but I don't want to lose the version control or other TFS things.
So far, I've tried simply replacing the files in the Site project's folder with the files from the App project's folder, but Visual Studio still sees it as a Site. So I edited the .sln file to point to the .csproj, but VS tells me the project "needs to be migrated" (and if I try to do that, it fails).
Deleting project and adding a new one won't lose the version control. When you select Show Deleted Items, you still can view the history of the deleted Web Site project:
I have a source for an asp.net project (with vb.net behind). Is there a way to easily create a project for it? I know that I can just copy and paste the source into a blank project, but I noticed that e.g. VS 2013 has functionality "Project From Existing Code". But it seems like it cannot create an asp.net project. I wonder if there is something new that I don't know which would let me accomplish this task.
Thanks.
There is a way to do it but like the comments stated if you want to do it fast then just create the empty project and pull the files in.
Here's how you create the project by using the files.
You can go to IIS and create a website
Give the site a name
Use the file directory that your files are in for the physical path.
Choose a port to display the site on
Open up Visual Studios and select File > Open > Web Site
Make sure Local IIS is selected (if not click on Local IIS box)
Select the website name you just created
I have tried almost all methods to make new project using exisiting files of asp.net in vs 2010 but i failed to run on new machine.
each time i did this it shows error that "could not load project from d:\path name" etc etc that is my last computer path name
Now what i am looking for , i have a website and all asp.net pages but i am unable to see its working by single click on project exe .
please help me out that how i can make project using existing asp.net files
remember : i have only asp.net pages to laod directly into visual studio but i want project exe so when i click on .sln file i can see site working.
In order for it to work you need to keep in mind you have to use original source code and not pre-compiled code from the server. To import your old files into a .sln file:
Create a New Website/Web Application
Add Existing Item Select item(s)
that you are trying to import into this new solution.
Make sure you dont add any .vbproj or .sln files from the previous project.
I was trying to create a Dynamic Data Website using VS 2010 RC. An attempt to create an App_Code folder where I would put a LINQ to SQL class, failed. When I selected 'Add ASP.NET Folder' to add the folder, I had options to create only the following folders:
App_GlobalResources
App_LocalResources
App_Data
App_Browsers
Theme
What happened to the App_Code folder?
Why not create another project, a class library, and put it in there. That's by far the best way to keep those classes separate from the rest of your website.
To answer your specific question about the App_Code folder, it's available in WebSite projects as an Asp.Net folder you can choose from. But from a web application project, you can just create a new folder and name it App_Code and it will work just fine. This is as of Visual Studio 2010 RC.
you can't/shouldn't add the App_Code folder to a Web Application because this folder is designed for runtime compilation by asp.net and the Web Application project is designed for you to precompile your website into a dll which you can find in the Bin folder and deploy to your site. If you do add this manually, you may end up getting name clashes as the class will be precompiled to the dll and then asp.net will again try to recompile at runtime.
So, for Web App Projects, you should instead Add a folder called something like 'CodeFolder' and then add you class in there. Then right click properties on that class file and set its build config to compile rather than content.
I am working on my own web project for www.athenatennis.com.sg and am going thru a similar learning curve with that.
You can manually create the App_Code folder and add your class inside.
One thing you need to take note is... in the file properties, make sure the Build Action is set to Compile.
I also found this funny that it is missing. The thing is you "don't" need to create the App_Code folder you just add the classes to any new folder.
In VS 2005 any class outside the App_Code would give a compile error.
So I also want to know why they decided to remove this constraint? Was it because of people complained about it, or did the design concept changed and it was deemed necessary?
If you want app_code folder, you must create "ASP.NET web site". Once done, right click on website (Solution Explorer)-> Add ASP.NET folder->App_Code.
If you are looking at app_code folder inside "ASP.NET web application", you are wasting time.
in VS 2010, you need to create a solution, then right-click -> add new website, then when you add classes, linq2sql etc, vs will create the app_code folder for you
if you create a class, it will ask you if you want to add it on a App code folder.
It is very easy, just add the new class from 'Add New Item'. Visual Studio 2010 will automatically show the message that "Do You want to place the file in App_Code Folder". Just click OK.
This is the error I get:
Error 101 Could not load type
'control'. /Test.vbproj/x.ascx 1 1
WebDeployProject
This is a left over file that was part of the project last week, but one of the developers deleted it from the project. I have to manually delete the file in order to get the WDP to build. Is there a way to tell the WDP to ignore the files that are not part of the project or to see that these files are not part of the project and delete them?
You'll need to use your source control tools to find and remove local files that aren't under source control.
For instance, if you're using TFS, do the following:
Open Source Control Explorer (View -> Other Windows -> Source Control Explorer)
Right-click on the path in TFS that corresponds to your local working copy and select Compare
Use your TFS path as Source Path and your local working copy as Target Path
Under View Options, select "Show items that exist only in target path"
You've now got a list of all the files that exist in your local working copy but aren't in source control. For each file, either delete your local copy or add it to source control.
It could have something do to with the type of web project is it.
If it's a web site, then the compiler will attempt to compile every file in the folder. However, if it's a Web Application Project, then it will only compile those that you've specifically added as part of the project.
If you have recently deleted/removed a file from your project then you need go to Project > "Show all files" and all removed files will apear in your solution explorer. You can delete the file, /x.ascx and rebuild your WDP.
It has nothing to do with the type of Web project: http://amiraryani.wordpress.com/2008/11/06/web-deployment-project-aspparse-could-not-load-type/.
A Web Site itself considers files under its root directory as part of the site.
A Web Application Project itself allows you to customize build actions, etc. on a per-file basis.
A Web Deployment Project, however, will try to include files under the root directory (a la a Web Site), even if the WDP is associated with a WAP. That's why it doesn't matter which kind of Web project it is.
EDIT: To clarify, it would matter what type of Web project you are using if you were trying to Build, Debug, or Publish that project itself instead of using a WDP.