Kasper Skov
Kasper Skov

Reputation: 2014

Add "already added" folders to solution?

I created a couple of App_LocalResource folders along with alot of resx files in my MVC4 solution. But when web-deploying to Azure, they aren't recoqnized/found/listed in change sets. None of the folders are pushed to Azure. I can't add them to the solution cause they are already there? I created the folders through VS so i suppose they are included in the solution on creation.

What do I do?

Upvotes: 0

Views: 101

Answers (2)

Kasper Skov
Kasper Skov

Reputation: 2014

I changed Build Action for the resx file to Content instead of Embeded Resource. Embeded Resource complies the resources into a dll where you cant access the usual way.

Upvotes: 0

Sean Osterberg
Sean Osterberg

Reputation: 844

You need to set each of the .resx files' "Copy to Output Directory" property to "Copy if newer" or "Copy always." If you don't change this property for any of the .resx files in an App_LocalResources folder, the entire folder won't show up in your resulting cloud service package, and it won't appear in the Project/csx/Debug/roles/rolename/approot/bin folder when you debug locally either. When you deploy the package without changing each .resx file's "Copy to Output Directory" property, they won't be included in your service package when its uploaded via web deploy.

Also, from a maintainability standpoint, I would recommend looking into using Azure Tables instead of .resx files. They're more flexible in a deployed environment because a Table entity can be changed at runtime if necessary, without redeploying.

Upvotes: 1

Related Questions