Tuesday, April 23, 2013
The type name 'DateTime' does not exist in the type 'MyProject.Models.System' - Visual Studio 2010
Ended up replacing instances of System.DateTime with DateTime and System.Guid with Guid
Wednesday, April 17, 2013
Visual Studio 2010 Save a text file as a bat or cmd file without errors
Repost from...http://stackoverflow.com/questions/854360/visual-studio-inserts-invalid-characters-in-batch-files
Error Message:
C:\>
'' is not recognized as an internal or external command,
operable program or batch file.
Creating tables on server (LOCAL) and database PLEDGES
Done creating tables.
Quick Solution
In VS2008 and VS2010, select your file in the solution explorer and choose File...Save myfile.bat As...
On the down arrow on the Save button, choose Save with Encoding.
When saving in the Advanced Save Options dialog, Choose US-ASCII in the Encoding drop-down list. Set the line endings as required, or leave it as Current Setting.
Windows Services for constant Database Updates
Research on Windows Services.
What is a Windows Service: http://msdn.microsoft.com/en-us/library/d56de412(v=vs.80).aspx
Create a service using: http://msdn.microsoft.com/en-us/library/zt39148a.aspx
The installer service file properties will define the name and description of the service. Whatever you put in here as the name will appear in Windows Services.
Command line arguments to get everything running:
******
How to install this service
******
installutil.exe xyz.exe
******
How to uninstall this service
******
installutil.exe /u xyz.exe
******
How to Start the Service
******
net start "xyz"
******
How to Stop the Service
******
net stop "xyz"
******
To verify service is running
******
1. Go to Command line: cmd.exe
2. Type in: services.msc
3. Look for "xyz"
******
How to see what's happened with the service
******
1. Go to Event Viewer and view messages: eventvwr
2. Windows Logs | System
What is a Windows Service: http://msdn.microsoft.com/en-us/library/d56de412(v=vs.80).aspx
Create a service using: http://msdn.microsoft.com/en-us/library/zt39148a.aspx
The installer service file properties will define the name and description of the service. Whatever you put in here as the name will appear in Windows Services.
Command line arguments to get everything running:
******
How to install this service
******
installutil.exe xyz.exe
******
How to uninstall this service
******
installutil.exe /u xyz.exe
******
How to Start the Service
******
net start "xyz"
******
How to Stop the Service
******
net stop "xyz"
******
To verify service is running
******
1. Go to Command line: cmd.exe
2. Type in: services.msc
3. Look for "xyz"
******
How to see what's happened with the service
******
1. Go to Event Viewer and view messages: eventvwr
2. Windows Logs | System
Friday, April 5, 2013
Post-build Event Command Line Visual Studio
So, I'm working with the post-build event command line in Visual Studio. Specifically, I want to move all of my newly compiled dlls to another directory due to testing a plugin. The end result is that everything worked. But, I had to go back into the DOS world. Enough of the chat... here's my line
copy "C:\TFS\postbuildevent\bin\Debug\*.*" "C:\newdirectory\" /Y
Why the quotes? Visual Studio needs the quotes around the longer directory names and those with spaces. If you don't use the quotes, you will get a file not found error. Also, I wanted to avoid the prompt for copying files, therefore, I used the /Y flag at the end.
If you want to test beforehand, open the command window... cmd.exe.
copy "C:\TFS\postbuildevent\bin\Debug\*.*" "C:\newdirectory\" /Y
Why the quotes? Visual Studio needs the quotes around the longer directory names and those with spaces. If you don't use the quotes, you will get a file not found error. Also, I wanted to avoid the prompt for copying files, therefore, I used the /Y flag at the end.
If you want to test beforehand, open the command window... cmd.exe.
Subscribe to:
Posts (Atom)