I am a bit baffled, I have an MVC3 project in Visual Studio 2010, and as part of our build script which outputs the compilation to an "output" directory.
This all works fine, however we are now using webfonts as part of our site and no matter what I try, the webfonts never find their way to the _PublishedWebsites folder, even with Copy To Output Directory just puts it in the general output folder not the _PublishedWebsites one...
So am I missing something?
Had the same problem too. When your project is open, select all the webfont files in Solution Explorer. Right click on any, and select "Properties" from a context menu. In the collective properties dialog that will appear, set "Build Action" to "Content". This will tell the package assembler to treat these files as content indeed.
Related
I have a project where I have a folder name JS. Each time I open the solution I see the folder is not included in the solution explorer. I have to use the Show all files and include the JS folder and add the existing items. It works again. If I close the solution I get the same problem. I have not changed any setting in VS, what is wrong here?
I moved my Asp.net-mvc project from desktop to F drive and all the files are showing as miscellaneous files.
I've tried running the visual studio installer and modify to make sure that "Nuget targets and build tasks" are ticked.
I've also tried :
excluding the file
add existing member(adding the file again)
but nothing's working.
Same thing happened with my asp.net core web api when I moved it, it's working fine tho, getting data from server.
Hope you will solve your problem
Solution 1:
Create new project then paste all project contents in new created project.Restore Nuget packages then Build it.
Solution 2 :
Go to the file which are Miscellaneous inside Solution Explorer.
Right click those file'(s) and select Exclude from project.
Add Existing Item to project, you just excluded.
Probably your file property configuration is wrong.
Try this:
Right click over the File that has this problem
Click on Properties
Under Advanced -> Build Action, check if other than "Compile" is selected.
If so, change it to "Compile".
Properties Window
I have an MVC project that I built in Visual Studio 2013 and when I publish the project up to Windows Server 2012, any changes I made in the bootstrap.css file don't migrate. I know it is just that file specifically because any changes I made to the Site.css file appear on the server. Everything else works except the one bootstrap.css file.
I really don't want to have to pull out the changes in bootstrap.css, it would take a lot of searching. Is this problem common? Has anyone even heard about this issue?
I had an idea to take the code from my bootstrap.css file and minify it manually, then copy it into the boostrap.min.css file. After doing that, I published the project back up to my server and everything is now working as expected.
In Visual Studio's Properties pane (for the file in question) check that the Copy To Output Directory property is set to Copy Always.
Also, in the Publish settings dialog, on the Settings tab,
expand the File Publish Options collapsible region and make sure Remove additional files at destination is checked (turned on).
In my MVC project I have a folder called Documents and inside that are some .txt files. These have information relating to the inner workings of the website and one document has usernames & passwords (for the dev database, not live).
When I publish to the server this folder gets copied up, which I do not want.
In its properties, "Copy To Output Directory" is set to "Do not copy" but it still gets copied.
In another project the Documents folder is in the Repository layer which compiles into a DLL and I don't see the folder or txt files on the server. The MVC project where I am having the issue doesn't have a layered architecture. I could create a class library project for it but that seems silly.
Set "Build Action" property of the file to "None".
You have already set the "Copy to Output Directory" to "Do not copy", so that is already covered.
Right-click your MVC project in the solution explorer. Click "Package/ Publish Web", and make sure to select "Items to deploy" to "Only files needed to run this application" option.
My problem is that in my scenario, I have a project with two parallel project files for different build targets. I have a ProjectName.WP8.csproj and ProjectName.WinRT.csproj, which essentially include the same files.
I am trying to check-in this solution (SolutionName.WinRT.sln) to TFS and I get no errors. All the code changes to the code in the project goes through, but when I check the actual state of TFS, the (newer) PorjectName.WinRT.csproj files are not checked in.
This is quite peculiar since it worked perfectly for the WP8 version. How can I support this kind of scenario?
(If it's not possible, how do I easily migrate my parallel project to another TFS project?)
Just had this come up myself. I had been working on a project for a few days before checking the solution in. During the initial check in for the project, only the most recent file edits were seen by source control. I was able to highlight all the files in the Solution Explorer and select Add to Source Control from the right click menu, but the csproj files themselves did not check in. To do this, I had to go into the Source Control Explorer and open the project directory. From within the directory, right click and select Add Items to Folder. Then you can select the csproj files and you're good to go.