Hi All I have a VS 2008 ASP.NET solution with website project and many other projects. I've had to add new items to the Web Stite part of the solution. I added them (new items) in Visual Studio that part is OK. Now I need to check in my changes to Version Control. I added new files. But I think I also need to check in a .csproj file which has info about the new item I added. And here lays the problem. I found the sln file which lists all the .csproj files, but I added the new items to the Web Site project and there isn't a .csproj file for it anywhere? The .sln file does no list the items which are part of this project so where is this info in? What file do I need to check in for the project to know about those new items I added to it. I've been pulling my hair for a couple of hours. Please help
Related
I worked on some C# app (wpf), I uploaded it as zip file to google drive for now that's the only copy of the project That I have.
The problem is that I forgot to upload the .sln file.
When I downloaded the app from google drive to my pc I took some other .sln from other app and it worked fine for now.
Is it ok? I mean it can cause any problems in the feature?
A solution is sort of like a container that holds all your projects together. So as long as you have a valid project file (.csproj) you can simply create your own solution file and add the project to it.
If you go to:
File > New > Project
you can open up New Project dialog box.
There, under:
Installed > Other Project Types > Visual Studio Solutions
you can create a blank solution.
Once you do that, then you can add your existing project to this new empty solution.
For that, go to your Solution Explorer, right click the solution and select Add > Existing Project and select your project.
I took some other .sln from another app and it worked fine for now:
Most of the time: If you have a single csproj file, all you have to do is double click on the csproj file to build it. Visual Studio will automatically create a solution for your single csproj.
Is it ok? I mean it can cause any problems in the feature?
I think the big issues will only come when you have more than one project in your solution.
For example, lets say you have a solution with Project A and Project B, and project B has a reference to A.
You will need to add both projects to your new solution so that .NET knows to build A first, then build B using the output from building A.
I'm creating a project template to make the development process here in the company smoother.
I've created the template and it works ok, I can create a new project based on the template.
The only issue is that some files are included in the new project that I don't want included for instance the .vstemplate file.
I've searched the web/here on how to do this, but I can't find the answer...
What am I missing?
Would excluding files from the template project achieve what you want? You can do that by right clicking on a file in the solution explorer and clicking Exclude From Project
Example:
I had an Asp.Net MVC project, in VS 2013 update 4, and now I continue working on it in VS 2015. The Asp.Net version is not upgraded, i.e. I still use the stable asp.net 4 and MVC 5. The problem is: I cannot publish this project anymore. During the publish, it complains about xml files of every library I use, like EF, OWIN, ... both for Nuget libraries and normal .net framework libraries.
I tried adding these xml files from other sources and the publish proceeds further, but it raises another error like this:
C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v14.0\Web\Microsoft.Web.Publishing.targets(2991,5): Error : Copying file obj\Release\Package\PackageTmp\Content\bootstrap-rtl.min.css to obj\Release\Package\PackageTmp\obj\Release\Package\PackageTmp\Content\bootstrap-rtl.min.css failed. Could not find file 'obj\Release\Package\PackageTmp\Content\bootstrap-rtl.min.css'.
I removed this file from the project and the error still refers to this file. I searched the solution folder for this name, both in file names and file contents and I don't have it anywhere. It seems that Visual Studio has cached the publish procedure somewhere and does not update it when the project changes.
Any hints or solutions?
In our case the solution was to create a new clean project, then copy all source code files (C# code, javascript, css, razor templates, html, ..., but not for example, contents of bin and obj folders) from the old project into the new one, and then adding them to project (in solution explorer).
Don't waste too much time on solving this problem, dodge it.
I have an already existing solution file for my live website. If I add any new files(.aspx page) in my project, I have to explicitly add those new files to the solution by right clicking on the project -> Add -> Existing item -> selecting the files.
Now, after adding the files for the first time, I added few more files later. During that time, I found that the files which I added in my first deployment were missing and I had to add the old files again with the new ones?
Am I doing anything wrong or is that the way it works? Do I need to add all the new files explicitly to the solution every time before publishing to the server?
The issue which I was facing was because my project's ".csproj" file was not getting updated while deploying the project. It is ".csproj" file which keeps track of all the files which have being added newly. Once I updated the particular file in my production environment, I was able to see all my project files and it didn't require manual intervention. Thanks all for your help.
Suppose I have two MS LightSwitch projects. I really like my table layout in one project and want to copy it to the other project. How is this done? What files have the table and key definitions?
The easiest way would be to publish the application, then use a copy of the published database as an attached data source in the new project.
The defintions that you ask about are stored in an lsml file (a LightSwitch-specific XML file), ApplicationDefinition.lsml for LS 2011, & Common.lsml for LS 2012. But be VERY careful if you try to edit this file in any project, it only takes ONE mistake for the whole application to no longer load.
[WARNING: NEVER DO THE FOLLOWING! IT MESSES UP YOUR PROJECT IN VISUAL STUDIO]
What I did in LS 2013 was to create tables with the same name in the new project, so they are already "known" to your project settings. Then I went to [project folder]\[project name]\[project name]\[project name].server\DataSources\ApplicationData of the project I wanted the tables from. I copied the respective files (including script files, if you did data validation, which I also created in the new project with dummy entries) and then overwrote the files with the same name in the respective ApplicationData folder of the new project, which I had created.
When I loaded the project again, Lightswitch showed the new tables in my old project.