Andrey M.
Andrey M.

Reputation: 3806

Disable *.java files compilation in asp.net web site

I have some *.java files in the asp.net web site. And when I try to build web site in visual studio it fails with error

Error 1 The CodeDom provider type "Microsoft.VJSharp.VJSharpCodeProvider, VJSharpCodeProvider, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" could not be located.

But I don't want to compile it. The files is just to show source code in browser. The solution can be to rename the files with other extension, but may be it is possible to just disable compilation for java files. It will be the much better solution. Any ideas how to disable it?

Upvotes: 3

Views: 1230

Answers (2)

manojlds
manojlds

Reputation: 301327

If you want it in the solution, make sure that the build action is not set to compile:

enter image description here

Set it to content etc. or just remove it from the solution.

Upvotes: 1

Muhammad Akhtar
Muhammad Akhtar

Reputation: 52241

You can exclude these files from project.

Right Click on the File and click Exclude From Project

Upvotes: 0

Related Questions