"MarkupCompilePass1" task has been declared or used incorrectly

hed bisker

Member
Joined
Aug 5, 2018
Messages
16
Programming Experience
1-3
I Have got an error on my project. I have no idea What can cuse it...
TY!!

1607951379864.png
 
Without seeing your code, all we can guess is that the errors shown in your screen shot are given my you the best advicebregarding checking is the spellings are correct, the assembly exists, etc. The follow up errors on the screen suggest that a file cannot be found. Are you sure that file exists?

As an aside, constructors for classes should be simple and just do basic initiatilization. They should not do any heavy "work". If you are trying to open a file in your constructor, and that fails, then you are stuck in a limbo state that you find yourself in where there are many possibilities of what may have caused the failure: did the assembly fail to load? Did the assembly load, but the class could not be found? Was tht class found, but the constructor could not be found? Was the constructor found, but it threw an exception while executing? Furthermore, trying to clean up or recover from a constructor failure tends to be a lot harder forcing you to think like a C++ programmer, instead of cruising along like a C# programmer.
 
Without seeing your code, all we can guess is that the errors shown in your screen shot are given my you the best advicebregarding checking is the spellings are correct, the assembly exists, etc. The follow up errors on the screen suggest that a file cannot be found. Are you sure that file exists?

As an aside, constructors for classes should be simple and just do basic initiatilization. They should not do any heavy "work". If you are trying to open a file in your constructor, and that fails, then you are stuck in a limbo state that you find yourself in where there are many possibilities of what may have caused the failure: did the assembly fail to load? Did the assembly load, but the class could not be found? Was tht class found, but the constructor could not be found? Was the constructor found, but it threw an exception while executing? Furthermore, trying to clean up or recover from a constructor failure tends to be a lot harder forcing you to think like a C++ programmer, instead of cruising along like a C# programmer.
I make clear and then Build again several time and then it work.... I have no idea why it happen
 
In general, you should build code on your local drive, not on network file share. Yes, network shares are much more reliable now compared to the 80's and 90's early LANs, but still not quite fully as reliable as a drive on your machine. Also, there is a major speed advantage.
 
Back
Top Bottom