Visual Studio :: Run A Simple Console App On Win7 VS2010?
May 19, 2010I'm trying to run a simple console app on Win7 VS2010.
Here's the code:
using (FileStream stw = new FileStream(@"c:OrdersToday.pdf", FileMode.Create))
I'm trying to run a simple console app on Win7 VS2010.
Here's the code:
using (FileStream stw = new FileStream(@"c:OrdersToday.pdf", FileMode.Create))
We recently converted the VS.2005 application into VS2008 in XP machine and it was working fine like compiling with out any issues and working as expected. But recently team upgraded laptops to Win7 when trying to compile it we have got issues then we changed the compiler settings to 'x86' and compiled it went good. But after that login screen came when ran the applciation without environment selection (production, DEV, Testing etc). basically we are getting this environment setup from system registry, we uderstand that Win7 is looking in different location hence no environment information is coming up..later we see that where the code is looking for environment environment and created environment keys in registry, after that environment infromation displayed in login screen but not able to login into applciaiton throwing exceptions like " Class not registered (Exception from HRESULT: 0x80040154 (REGDB_E_CLASSNOTREG))"
View 6 RepliesI am trying to provide the reference of one of my web services from my asp.net web application in Visual Studio 2008 by clicking "Web services on the local machine.
However I am getting the following error:
There was an error while enumerating services on local machine: Active Directory Services cannot find the web server. A possible cause for this is an incompatibility between versions of Internet Information Server (IIS) on the client and the server. Another possible cause is that IIS is not installed on the local machine, or the user identity under which you are running may not have permissions to view websites on this machine. To view websites on this machine, make sure that you run Visual Studio as administrator. On Windows Vista computers with IIS installed, make sure that IIS Metabase and IIS 6 configuration compatibility feature is enabled.
I have installed IIS successfully and I am running Visual Studio as an administrator.
I just can't seem to get C# code to auto-format, despite having gone over all the Formatting options for c# to make sure they are correct. For example, I want brackets to auto-format to a new line, but nothing changes. I want catch keywords to automatically go to a new line, yet they don't. The options are checked in Formatting under C#, so what gives? HTML formatting works, and prop-tab-tab works in c#, but new line formatting and such does not.
View 1 RepliesGetting the below error while setting up application on Win 7 using visual studio.NET 2003.
Error:
cannot find the components for communiacting with the front page server extensions...
I'm trying to share settings between two projects: a console app and a WPF app. The WPF app only exists to view and change those settings.
So in my console app, I wrote the following class...
[Code]....
My WPF app has a reference to the console application, so it can access the members of this Settings class.
So you'd think that if I use the WPF app to change one of these settings, then the next time I run the console app that changed setting would be available, but that is not the case. I'll change the masUserID setting from Bill to Ted, for example, but when I launch the console app it shows the setting is still Bill. If I run the WPF app, it's set to Ted.
I am having set of tables in dataset, that need to convert into PDF in console application, i can do that in website by using this code
DataSet dsMainContent = new DataSet();
string strConn = ConfigurationManager.ConnectionStrings["ConnectionString"].ToString();
SqlConnection conn = new SqlConnection(strConn);
SqlDataAdapter sdAdp = new SqlDataAdapter();
sdAdp = new SqlDataAdapter("select * from CLIENT_MST", conn);
sdAdp.SelectCommand.CommandType = CommandType.Text;
sdAdp.Fill(dsMainContent);
GridView1.DataSource = dsMainContent;.......
I am getting error in HTMLTEXTWriter its not accepting in console application.
I have requirment o send bulk Email to client more than 10,000 a day so howz to manage into console .NET / c# applictaion if any of Email id failure to send then application didnot stop it wil continueolsly sending email from next one
View 1 RepliesMy VWD 2010 Express Edition appears to be missing the console application template. I have searched all the options under new project in VB and C# but it just is not there. I would like to add the console application template option .
View 3 RepliesBefore you start using VS2010 RC, knowing that the RC version was launched with a serious bug as reported on the link below.The bug is related to the use of controls within containers in an ASP.Net application, and like almost every ASP.Net application has any container, it is impossible to migrate an application VS 2008 to VS 2010.Before you start any work or migrate to the IDE of VS2010 RC, you know this bug.
View 20 RepliesI know for those who dont use it may think this is minor, but it appears that VS2010 has done away with the "Brief" style editor. Brief style editing makes me way more productive since I am one that tends to spend most of my time in the code. Does anyone know how to turn on Brief style editing in VS 2010 or are there any plans to add it in?
View 4 Repliesif i add the SQL Database to the solution (in APP_Data folder) what are the enhancments provided by the VS2010 for it?is there any mechanism to synchronize this DB with the SQL Server DB? or can i use the SQL SERVER DB in my project which remains physically in the APP_DATA folder and SQL SERVER as well?
View 3 RepliesI read somewhere that MS has integrate SilverLight Toolkit into VS2010. Where is it? I can't find it under Toolbox.
View 2 Repliescan someone recommend me of an online source(version) control integrated with visual studio 2010(free if there is or chargable), something like Microsoft visual source safe hosted in a static IP.
View 2 RepliesI'm trying to publish my mvc3 project to a web host server, I right clicked my project and selected publish, there i entered the ftp information, VS2010 uploaded the files to the ftp, but when i try to surf to the remote site i get an error "Directory Listing Denied". all guides I found requierd an installation on the web host side, is there no way to just upload the site like in classic asp?
View 2 RepliesI installed and reinstalled again SP1 for VS2010 I cannot get CSS3 support. HTML5 is working fine
When I open a css file, I can see only CSS 1.0 CSS 2.0 CSS 2.1 as validators.
I am trying to figure out how to use the web deploy feature in VS2010.I installed the web deploy on a 2k8 server, started the services and went to try a deploy. VS2010 is tellingh me the remote certificate is invalid according to the validation process.
I am trying this on a local VM i made so I could see if it works or not.
i have been trying the new VS2010, but i am having trouble to add to the dropdown list of frameworks the .net framework 2.0, i have installed the .net framework 2.0 and also the SDK, but nothing seems to make it to appear in the VS2010 multitargeting dropdown list. Can somebody give me the reason of this, what do i need to do?
View 3 RepliesOn my development box I have VS 2010 Ultimate (64bit), SQL 2008 Express, and SQL 2008 DEV R2 all installed on the same machine. I can access either SQL with Management Studio R2 but I am having problems getting VS to open MDF files in the App_Data folder.It is trying to open them with SQL Express rather than the full version of SQL.I get an error about verion 661 is incompatable with the version installed which is 655.So what I need help with is, I guess, How do I add a program in VS for "open with" to use SQL 2008 R2? The present default for MDF files is "SqlExpress File Bootstrapper (Default)".I can't figure out where to point for it to open.I have considered uninstalling or upgrading the Express edition.
View 7 RepliesI'm the first time using VS2010 deployment tool. I selected FTP publish, and all the configurations are correct. I'm just confused that after I clicked publish, there is no window or text shows the status of the uploading progress. When would it be finished? It's taking so long, and in the meantime I can't do anything.
View 2 RepliesI've converted an ASP.Net website over to an Azure version and I've got it up and running. However the vast majority of the time I experience timeouts when I'm trying to debug the application.This seems to happen on any page at any time. I start debugging from VS2010 and sometimes the home page will come up sometimes it hangs. When it does come up if I select an item from a drop down list sometimes it works somtimes it times out. I have breakpoints set and they don't even fire I just eventually get the time out.
If I hit refresh that sometimes seems to fix it but it eventually starts happening again. This is making the completion of the conversion VERY difficult and I'm starting to creep up to a deadline.Does anyone have any idea what might be happening? If there is a better location I can post this question to would someone be kind enough to point me in the right direction?Thanks in advance for any help and in addition my email is
mgorgone@pictureu.com as our Windows Live account email is diff.
In some of my new websites under .NET 4.0 my Visual Studio does not recognize System.Linq as a valid class. I need to add a reference to System.Core in Web.Config to solve this but there are projects where this is not needed.
View 8 RepliesAny one now when VS2010 will be able to develope to smart devices?
View 1 Repliesthere is probably a really simple answer to this, but I have the flu and can't think straight. I am taking advantage of being out sick by downloading VS2010RC and playing around with it. I created a simple WCF service (my first in this foundation, but not my first service). Its a redo of an existing asmx service I created a while ago. I commented out all the processes, and am simply trying to publish the service to my local IIS7 to see the discovery working. I have setup a new site to host the service ( I tried using Default as well, with the same results). I right click the project in VS and select publish. It is prompting me for a login even though the site is setup for anonymous access. If I try to use WebDeploy, it can't find my site, and if I use FileSystem, it give me a simple "Publish failed" with no details. Can someone point me to a tutorial or something that describes the publish process in VS2010 or give me some leads as to what setup needs to happen either in VS or ISS to let me publish?
View 4 RepliesI'm going thru an asp.net 4 book, and I'm at a part about classes and their properties and functions. But up to now, all the examples involve a web_site, with controls, code_behind files, CSS, etc. But, I get to places where I don't understand the examples, so I look out on the web for other resources. For example, I found the code below to demonstrate the "ToString" function. My problem is, I'm not sure know how to test a little piece of code like this. Can't I just open up an application or project or something, paste this in and run it?
Module Module1
Class Perl
Dim _a As Integer
Dim _b As Integer
Public Sub New(ByVal a As Integer, ByVal b As Integer)
_a = a
_b = b
End Sub
Public Overrides Function ToString() As String
Return String.Format("[{0}, {1}]", _a, _b)
End Function
End Class
Sub Main()
Dim p As Perl = New Perl(2, 3)
Console.WriteLine(p)
End Sub
End Module