How to enable "Reinforced.Typings" in the configuration? - c#

Rebuilding the project does not run Reinforced typings. It says in Output:
warning : Reinforced.Typings will not run because it is disabled in its configuration
I tried making a completely clean and new project, but the same thing happened.
It does not seem to be an error in the xml or Configuration files to me.
How do you enable it?

Usually RT is being disabled by <RtDisable> parameter set to true (actually any value that differs from 'false'). Please double-check it.
Also please check that there is reference to Reinforced.Typings.targets from your .csproj file (it must be added automatically by NuGet).

Related

C# Not recognizing resources, why?

I am trying to build a C# Program (https://github.com/f1r3fr0st/ajart-studio-edit). First, I tried to load the file but I had the wrong .NET version. I was able to update to 4.6.2 though.
When I attempt to build the project, I get a multitude of errors which claim that the resources were not able to be found (PcapDotNet, NAudio, AMF3SpecCli, etc.) even though they are all in the project's "Resources" section. Somehow, I have no idea how to replicate it, I was able to get most of the errors to dispensary, with AMF3SpecCli being the only one not to work. It seems like sometimes the only build error is AMF3SpecCli not existing, sometime's it's all of them. What's wrong with it?
Based on research, I can build and run the app successfully.
Please refer to the following steps to build your app.
First, Please set your warning level to be 0.
Second, Please find the Main.rex file and click Unlock and apply it.
Third, please delete the AMF3SpecCLI in your current references and add it from resource.
Fourth, please delete the iso file.
Finally, you can build the project successfully and run it.

Unable to add a service reference - locked/read only

Whenever I go to add a service reference I get the error:
Failed to add Service Reference 'Servicereference1.reference'
Error: Unable to check out the current file. The file may be read-only or locked, or you may need to check the file out manually.
I already had a service reference in the project, but it broke somehow and gave me an error that stated:
Could not find default endpoint element that references contract (servicename)
The endpoints in both the web.config and the service reference config were the same (localhost)
I also could not update that reference as I would get the same 'unable to check out current file' error.
EDIT: The problem isn't native to just this project. I tried to make a new, totally separate project, and add a service reference to that and I got the same error.
I had the same error - what I found, was that there are problems if you have source control plugin "Microsoft Git provider" selected (my WCF solution was not added to source control!) and you try to add service reference.
set source control plugin to None
go to TOOLS > Options > Source Control.
add service reference
set the source control plugin to the original value
I know this has been answered, but before trying everything else in the answers, restart visual studio.
This just happened to me and 4 other people in my WCF class. Seems to be a problem with visual studio 2013 and not 2012.
As you have already cleared there is no source control involved(which seems to be cause of problem to me), you can try these steps:
Make sure if you copy paste from location where there was source control then remove source control specific files.
Make sure folder is not locked & also is not read-only. If it is so, then remove read-only from the folder.
Make sure visual studio is not in debugging mode while adding reference.
If above not works, close visual studio & restart it.
Make sure Visual Studio is started as "Run as Administrator".
Finally if all above doesn't work try restart machine.
Let me know if it works or not.
Maybe it's a bit late, but if someone has the same problem, I solved it running VS2013 as administrator.
Go to Debug menu and click on (Options and Settings)
Select Source Control.
Under Current Source ControlPlug-in drop down select none
Then click ok to save chnages,Now you can add service reference.
Oddly enough I was experiencing this in VS 2019, using git source control. I was able to resolve this by simply cleaning and rebuilding the project containing the service reference...
EDIT: If you already have a service reference that you're attempting to update you might have to delete it and add it again
Looks like some Visual studio file has gone corrupted. Try deleteing the reference completely then generate the reference using svcutil {http://{service}/metadataEndpoint} ( I assume it is WCF) or (use wsdl.exe for webservices), then get the client proxy and put it in the project to use it. See if that works fine.
Shutting down your default source control to add reference is horrible. #ScottG said above, and does work.. just start VS as administrator - that works, and you dont have to mess with your environment. VS 2013 UP-5 still has this issue.
Check if your files are read only, if yes remove the read only attribute and restart the visual studio and try to add service reference.
it worked for me like this.
Make sure, your folder in IIS where your services put (I mean the physical file; .svc) is not open or even selected in file manager. It's work for me, but before I almost went mad to find error.
My issue was related to source control but I found an easy work-around. Open the App.config file and make any change and save it. This unlocked the file and allowed me to add the service reference.
ok, I am last here and spend 1 day to search the solution , nothing was wrong in my code and I tried multiple times restart machine , close reopen visual studio but nothing worked .In my case there were some update in visual studio 2019 and that was causing the issue. After installing the update I was able to update the service reference. Hope this will be helpful for some one .

Visual studio cannot start debugging because the debug target is missing [duplicate]

When I try to build my solution, I get the following error:
Visual Studio cannot start debugging because the debug target 'c:\target' is missing. Please >build the project and retry, or set the OutputPath and AssemblyName properties appropriately >to point at the correct location for the target assembly.
My output path is set correctly to bin\Debug, but the exe is never created in that folder. Instead, all I get are the exe.config, vshost.exe, and vshost.exe.config files.
Any idea what's going on?
Make sure that output path of project is correct (Project > Properties > Build > Output path)
Go in menu to Build > Configuration Manager, and check if your main/entry project has checked Build. If not, check it.
Go to properties > Application , and select the output type of your project
I've had the same problem;
Here are solutions that didn't work for me:
Building/rebuilding entire solution
Making sure the output path was correct (MyProject > Properties > Build > Output > Output path)
Here's the solution that did work for me:
Rebuilding just the project
You could open the project file with a text editor and replace 'c:\target' by 'bin\Debug'
EDIT
There are other more helpful answers but I can't delete mine since it's the accepted one.
#CZFox Answer
#Yehuda Shapira Answer
steps for changing target path is
Go to Properties
Then go to Debug
Browse the Start external program and select the bin/Debug/.exe file
I have solve this type of problem follow this step
1.VS2010 right click on the solution explorer and select the Build.
Again press Ctrl+F5 or F5
You can try the following steps to resolve the problem.
Step 1:
Right click on the solution and select the property
Step 2:
In Configureation property select the Build option button
I just stumbled across this problem, but I'm using Visual Web Developer Express 2010 and couldn't find any wrong path either within IDE or in the project file. Rebuilding or deleting build folders didn't help.
But after examining the projects .user file, which I've never done before, I discovered that the bad path was in there. Very simple if one knows where to look.
I had the same problem and the real solution was embarrassingly easy:
If, in your project, Visual Studio has never successfully compiled the program (before finding the first bug), you will get this error. What I did was remove all offending code (in my case, leaving just a simple button1_Click with no code). Run/Compile the code one time; exit the running program, and this message goes away.
The Compiler builds various directories and files on a first successful compile and these are used by the debugger. I am now recommending with all new projects, define the form, compile, close, and then begin coding.
I've found that this can happen if all the files are deleted from the bin folder. ReBuild the app to force a full build: right click on the project in solution explorer and select ReBuild.
Please follow the below steps to overcome this problem:
If you are working with VS2010, change platform target to x64
Select .net framework as 3.5
If you are using any custom code for Sharepoint and like to debug or deploy the use the above....and my bad sake i dont abt the .net applications
I had this error too (in VS2010), and in my case (two projects in one solution, with one being for unit tests) the answer was to go into the solution's (not the project's) properties and set a single startup project. I would've thought it also necessary, in that project's settings, under Application, to specify the "Startup Object", but it's working for me with or without that.
Although this has already been answered, I found that my own solution was none of the above. Admittedly a rookie mistake, within my solution I had multiple projects, and thus when trying to run solution, the wrong project was set as the Startup Project.
So in my own case, not to say others, the solution was to right click the project and select Set as Startup Project
I tried everything mentioned in this thread but none worked.
Then, i tried the simplest thing and it worked.
Close visual studio and open it back up again.
This was a really annoying error!
I kept trying to start a debug instance but it just wouldn't make an exe! Though there were errors in my ConnectionString (while trying to make an SQL connection). There were two backslashes that were supposed to be a part of a path and the tutorial I was following told me to ignore it.
Well, turns out that was the error. A backslash marks the beginning of some escaping that you want to do, and the way to have a backslash displayed is \\ instead of \.
Got rid of that, and it worked for me.
EDIT: It would seem that you have to get rid of the tiny errors that you have made while writing your code to let it compile properly.
I have solved this problem by changing the Platform Target to "any CPU".
If the above explanation does not help you, then you could have error in the program. I have the same issue and I solved it as I cut the functions used in the same class and one of the functions were the cause of it.
I had a very very similar problem, but almost non of the solutions worked for me, finally when i reset the VS setting, it fixed...
To reset settings:
Tools Menu >
Import and Export Settings >
Select Reset all settings radio >
Next >
Next (You can backup your current settings in this step) >
Finish
Problem:
The problem was I had bad nuget source configuration, so the solution could not start properly despite the fact it was build correctly because it still saw old dll references.
Solution:
It was not enough to change nugget source url, I just had to remove entire nugget source and add it again with proper url.
Clean solution and rebuild it.
There are many issues that can lead to this problem, after losing 2 days to this issue I think I have the root cause of this issue and also the problem of the Form Designer throwing an error when switching to the Design view (also seems to effect the DataSet Designer):
A language syntax error that Intellisense doesn't catch.
Once I went through my code with a fine tooth comb I found a couple of really boneheaded mistakes that I kept overlooking, once those were resolved the solution compiled just fine and the output was in the correct place.
Here is the solution for this problem, no need to change anything for this problem.
You all know C# is case sensitive language and we have to write all methods and statements in correct case.
We all are just missing this thing and we just have to change method 'main() --> Main()'
This thing solved my problem please let me know if you still find any :-)

VS2012 automated deployment - OutputPath property is not set for project

Ok, I know this has been asked a bunch of times...
I have tried to change the configuration and the outputPath, but still I have this issue.
I am setting up automated build and deployment for our product.
We have a single solution file and multiple projects within it.
Using VS2012 and the default build definition, I have set the "Items to build" to a single project - the one we wish to have build and deployment for.
Lets call this project "Forms".
When I run the build definition, it builds and says success. However, it gives a warning:
$/XXX/TRUNK/XXX/Forms.Web/Forms.Web.csproj - 0 error(s), 1 warning(s),
View Log File
C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Microsoft.Common.targets
(610): The OutputPath property is not set for project
'Forms.Web.csproj'. Please check to make sure that you have specified
a valid combination of Configuration and Platform for this project.
Configuration='Release' Platform='Any CPU'. You may be seeing this
message because you are trying to build a project without a solution
file, and have specified a non-default Configuration or Platform that
doesn't exist for this project.
I have checked the .csproj file and there is a property group with the OutputPath specified.
I've also tried various combinations of configuration/platform, but the issue remains.
Does anyone have any idea what could cause this? It's driving me nuts. Without this fixed, no deployment is done... It seems to only build and doesn't even generate the .DLL files.
Try to delete the "Platform" environment variable.
(Visual Studio use this environment variable, which is possibly wrong.)
Then restart VS, and re-build the solution...

Debug Target Is Missing?

When I try to build my solution, I get the following error:
Visual Studio cannot start debugging because the debug target 'c:\target' is missing. Please >build the project and retry, or set the OutputPath and AssemblyName properties appropriately >to point at the correct location for the target assembly.
My output path is set correctly to bin\Debug, but the exe is never created in that folder. Instead, all I get are the exe.config, vshost.exe, and vshost.exe.config files.
Any idea what's going on?
Make sure that output path of project is correct (Project > Properties > Build > Output path)
Go in menu to Build > Configuration Manager, and check if your main/entry project has checked Build. If not, check it.
Go to properties > Application , and select the output type of your project
I've had the same problem;
Here are solutions that didn't work for me:
Building/rebuilding entire solution
Making sure the output path was correct (MyProject > Properties > Build > Output > Output path)
Here's the solution that did work for me:
Rebuilding just the project
You could open the project file with a text editor and replace 'c:\target' by 'bin\Debug'
EDIT
There are other more helpful answers but I can't delete mine since it's the accepted one.
#CZFox Answer
#Yehuda Shapira Answer
steps for changing target path is
Go to Properties
Then go to Debug
Browse the Start external program and select the bin/Debug/.exe file
I have solve this type of problem follow this step
1.VS2010 right click on the solution explorer and select the Build.
Again press Ctrl+F5 or F5
You can try the following steps to resolve the problem.
Step 1:
Right click on the solution and select the property
Step 2:
In Configureation property select the Build option button
I just stumbled across this problem, but I'm using Visual Web Developer Express 2010 and couldn't find any wrong path either within IDE or in the project file. Rebuilding or deleting build folders didn't help.
But after examining the projects .user file, which I've never done before, I discovered that the bad path was in there. Very simple if one knows where to look.
I had the same problem and the real solution was embarrassingly easy:
If, in your project, Visual Studio has never successfully compiled the program (before finding the first bug), you will get this error. What I did was remove all offending code (in my case, leaving just a simple button1_Click with no code). Run/Compile the code one time; exit the running program, and this message goes away.
The Compiler builds various directories and files on a first successful compile and these are used by the debugger. I am now recommending with all new projects, define the form, compile, close, and then begin coding.
I've found that this can happen if all the files are deleted from the bin folder. ReBuild the app to force a full build: right click on the project in solution explorer and select ReBuild.
Please follow the below steps to overcome this problem:
If you are working with VS2010, change platform target to x64
Select .net framework as 3.5
If you are using any custom code for Sharepoint and like to debug or deploy the use the above....and my bad sake i dont abt the .net applications
I had this error too (in VS2010), and in my case (two projects in one solution, with one being for unit tests) the answer was to go into the solution's (not the project's) properties and set a single startup project. I would've thought it also necessary, in that project's settings, under Application, to specify the "Startup Object", but it's working for me with or without that.
Although this has already been answered, I found that my own solution was none of the above. Admittedly a rookie mistake, within my solution I had multiple projects, and thus when trying to run solution, the wrong project was set as the Startup Project.
So in my own case, not to say others, the solution was to right click the project and select Set as Startup Project
I tried everything mentioned in this thread but none worked.
Then, i tried the simplest thing and it worked.
Close visual studio and open it back up again.
This was a really annoying error!
I kept trying to start a debug instance but it just wouldn't make an exe! Though there were errors in my ConnectionString (while trying to make an SQL connection). There were two backslashes that were supposed to be a part of a path and the tutorial I was following told me to ignore it.
Well, turns out that was the error. A backslash marks the beginning of some escaping that you want to do, and the way to have a backslash displayed is \\ instead of \.
Got rid of that, and it worked for me.
EDIT: It would seem that you have to get rid of the tiny errors that you have made while writing your code to let it compile properly.
I have solved this problem by changing the Platform Target to "any CPU".
If the above explanation does not help you, then you could have error in the program. I have the same issue and I solved it as I cut the functions used in the same class and one of the functions were the cause of it.
I had a very very similar problem, but almost non of the solutions worked for me, finally when i reset the VS setting, it fixed...
To reset settings:
Tools Menu >
Import and Export Settings >
Select Reset all settings radio >
Next >
Next (You can backup your current settings in this step) >
Finish
Problem:
The problem was I had bad nuget source configuration, so the solution could not start properly despite the fact it was build correctly because it still saw old dll references.
Solution:
It was not enough to change nugget source url, I just had to remove entire nugget source and add it again with proper url.
Clean solution and rebuild it.
There are many issues that can lead to this problem, after losing 2 days to this issue I think I have the root cause of this issue and also the problem of the Form Designer throwing an error when switching to the Design view (also seems to effect the DataSet Designer):
A language syntax error that Intellisense doesn't catch.
Once I went through my code with a fine tooth comb I found a couple of really boneheaded mistakes that I kept overlooking, once those were resolved the solution compiled just fine and the output was in the correct place.
Here is the solution for this problem, no need to change anything for this problem.
You all know C# is case sensitive language and we have to write all methods and statements in correct case.
We all are just missing this thing and we just have to change method 'main() --> Main()'
This thing solved my problem please let me know if you still find any :-)

Categories

Resources