Ratnesh Chandna
Ratnesh Chandna

Reputation: 395

Azure Deployment

I've been able to deploy my application to azure successfully until recently. Before my latest deployment, I added a few .less to the project. When I deployed the project with the added files, they didn't show up in the Contents directory of the remote site, while all other udpates were made.

Any ideas?

Upvotes: 1

Views: 272

Answers (4)

evgenyl
evgenyl

Reputation: 8117

How did you add the files? If I understand right, you are working with Visual Studio, and just copied files to your directory.

In some cases, the VS does not recognize such added files. In this case you can:

  1. Got To you Project -> RightClick -> Add Exists Item -> select your files or
  2. Go to Solution Explorer -> choose Show All Files -> select your files -> Right Click -> Include in Project

Upvotes: 2

Muhammad Basit
Muhammad Basit

Reputation: 89

Right click on file you added and set 'Copy to Output Directory' as 'Copy always.

Upvotes: 1

Waseem Hassan
Waseem Hassan

Reputation: 231

Just right click on the .less file and go to its properties. Change the Build Action to Content. Hope this helps.

Upvotes: 2

Ratnesh Chandna
Ratnesh Chandna

Reputation: 395

Never mind.

Here's the diff in the .csproj file:

-    <None Include="Content\less_file1.less" />
-    <None Include="Content\less_file2.less" />
+    <Content Include="Content\less_file1.less" />
+    <Content Include="Content\less_file2.less" />

Don't know why adding existing files to the content directory won't make the above change automatically. Am I adding files the wrong way here? Why would it say None instead of Content? I don't think this has happened to me before. I don't want to make such changes manually in the future!

Upvotes: 1

Related Questions