Localization is not working after publishing ASP.NET Core App - localization

I am using asp.net core and I am using Portable Object Localization.
My localization is working fine but after publishing my app, the localization is not working. I want to publish my web app to a folder. I defined (ps, en, prs-Af) localizations but I get the below folders.
This is properties of of one of po files:

I think the problem was that visual studio did not publish the localization files. I manually selected the files and chose the publish selected files from the context menu. Now it is working fine.

Related

How to correctly add a .resx file to an MVC 6 application.

Using Visual Studio 2015 I can add a Resource File (Resource.resx) to an MVC 6 Project. However the modifier of the resource defaults to: Internal.
If I right click on the resource and select properties I cannot see any of the Advanced properties that I used to be able to see i.e. Browse to URL, Build Action, Copy to Output Directory, Custom Tool and Custom Tool Namespace. The only two properties I can see are the Misc ones i.e. File Name and Full Path.
If I open the resource by double clicking on it, the Access Modifier in Visual Studio is disabled.
What am I missing?
Localization works a little differently in MVC6.
An example can be seen here: https://github.com/aspnet/Mvc/tree/dev/samples/LocalizationSample.Web
One important note is that you have to run the application using: dnx web as there is a bug when running the application from visual studio. See this issue for more information.

Can I create a Visual Studio project file from files on a server?

I have access to a working ASP.NET MVC 4 website through FTP but do not have the Visual Studio project file. Using these files can I create a Visual Studio project file?
If you have access to all the class files, views etc but are just missing the solution/project file then technically you can wrap them up in an empty project but it would still be a different project.
If you only have access to the published output (the views and JavaScript) then in short the answer is no, not without trying to reverse engineer the dll which I have heard is possible but have never tried myself.

VS2012 ProjectTypeGuids Lost when opening after installing ASP.NET and Web Tools 2013.1

I've installed the "ASP.NET and Web Tools 2013.1" in my Visual Studio 2012.
I have a solution which has an ASP.NET MVC 4 project with the following project type guids:
<ProjectTypeGuids>
{E3E379DF-F4C6-4180-9B81-6769533ABE47};
{349c5851-65df-11da-9384-00065b846f21};
{fae04ec0-301f-11d3-bf4b-00c04f79efbc}
</ProjectTypeGuids>
These Guids are for:
ASP.NET MVC 4.0
Web Application
Windows (C#)
This is the usual configuration when you create a new ASP.NET 4.0 project. And it works fine.
The problem is that, for some strange reason, whenever I open my solution the first GUID (ASP.NET MVC 4.0) is deleted from the .csproj file, so I lose all the related tooling.
No matter how I try to edit it:
if I close the solution, and edit this file manually, adding the missing GUID, when I open it again, the GUID is deleted
if I unload the project, edit the .csproj and reload it, the GUID is also deleted.
I have this project under version control (SVN), so I have also tried closing VS, updating the file in the SVN (using Tortoise) and reopening the solution. And you know what? The GUID is deleted when opening the solution !!!
If I create a new solution with an ASP.NET MVC 4.0 project, it works fine, and the GUIDs are kept.
Any idea why this can be happening and how I can solve it?
UPDATE
If I open VS in safe mode this doesn't happen. SO I suspect it must be an extension, but I don't know how to discover which is the offendign extension. Is there a way to know which extension can be responsible for this (apart from uninstall/try cycles...)
I found a temporary workaround hack for this problem:
Right click on the MVC project in Visual Studio and select "Unload Project"
Right click on the project and select "Edit YourProjectName.csproj"
Replace the contents of the ProjectTypeGuids tag with the following and save the file changes:
{E3E379DF-F4C6-4180-9B81-6769533ABE47};{349c5851-65df-11da-9384-00065b846f21};{fae04ec0-301f-11d3-bf4b-00c04f79efbc}
Open up Window Explorer and find the csproj file. Open up properties on it and mark it as Read Only.
In Visual Studio right click on the project and select Reload Project. You will be prompted to save as the csproj file. Hit Cancel when that comes up.
Go back to Windows Explorer and take off the Read Only flag.
As long has you have this project open in Visual Studio, it will think it's an MVC project, and you will have options to Add Views and Controllers. Once you switch projects or restart Visual Studio, you'll have to do this again.

Issues in creating custom multi project MVC 4 web application template vs2012

I am working on custom multi solution project structure having
1. 4 class library projects
2. One MVC 4 Web application.
I have built multi solution structure into VSIX package.Till here everything is fine.
Upon VSIX installation,I can see my multi solution project type in Visual studio 2012 projects.
When I try to create on out of it, it will display a following error while creating for every images present in "\Content\themes\base\images" in MVC 4 application
"The file ui-bg_flat_75_ffffff_40x100.png could not be found within the project templates.Continuing to run, but resulting project may not be build properly"
Although I have all the images as a apart of WEb Project templates.
Any suggestions
Verify that the images within the project template have Build Action set to Content and Include in VSIX set to True. Also, verify in your vstemplate file that the image is included as a ProjectItem and within the proper folder.
Or, if you have JQuery UI included as a Nuget package you can just install the package as a part of your template. Then, you don't even need to include the images with your vsix. http://docs.nuget.org/docs/reference/packages-in-visual-studio-templates

MVC 3 Views not deployed

I have been working on a small project on recent delived ASP.NET MVC 3 RC. The issue is that when I try to deploy my website via File System, certain views of my website are not deployed. The site gives me error when i copy same deployed site to my hosting. When I manually copy views to hosting, it works ok.
Now this thing is not breaking anything as such, just want to know that if I am missing something while deploying my site. I am not sure why few views are deployed and why not others. Seems very random to me.
Thanks,
If you created the app before RC (aka using our Beta) we had a bug in which we didn't mark the views as "Content". New apps using the RC have this bug fixed, but if you open an existing project, it doesn't automatically fix up the existing files.
To fix them, select the file and in the properties pane, set the Build Output to "Content".

Resources