yogesh_gaur

Hi,

I am using c++ with Visual Studio 2005 Professional. I can't find the application settings tab in Visual Studio.

Is this supported only for C# or Visual Studio supports it for C++ also.

If it is not supported in C++, how can I manually add a settings file.

regards,

Yogesh



Re: Visual C++ General application settings in c++ (Visual Studio 2005)

GET@h

Hi,
Are you talking about application properties If so, you can see them in Project -> Properties.


Cheers,





Re: Visual C++ General application settings in c++ (Visual Studio 2005)

yogesh_gaur

Hi,

I looked at the project->Properties tab and couldn't find any place to set up "My application" settings.

I do see a spot under windows forms properties:

+ data

application settings.

But when I try to add a user level setting (by using new). I get the following error:

"No settings file found in the project. Add a settings file and try again"

I am primarily interested in my application to save some user settings and some settings for some of the forms used.

Any help is greatly appreciated. This is a C++ application.

regards,

Yogesh





Re: Visual C++ General application settings in c++ (Visual Studio 2005)

Simple Samples

yogesh_gaur wrote:
This is a C++ application.

Is it a console program Probably not, but you don't say what type of program it is. Is it a traditional Windows SDK program, or does it use MFC or the CLR It probably uses the CLR and it helps to say so. For this question it helps to know what library is used.






Re: Visual C++ General application settings in c++ (Visual Studio 2005)

yogesh_gaur

Hi,

Yes, it is a CLR (Windows Forms application written in C++). I have searched all around and there doesn't appear to be support in Visual Studio for "application settings" for C++.

All of the support in visual studio appears to be geared towards C# and Visual Basic.

If I need to create it manually, is it best to use the class:

System::Configuration::ApplicationSettingsBase

If yes, I guess I will dig dipper into this.

regards,

Yogesh





Re: Visual C++ General application settings in c++ (Visual Studio 2005)

Simple Samples

I am not familiar with the CLR well enough to help further, so I hope someome else will,






Re: Visual C++ General application settings in c++ (Visual Studio 2005)

Bite Qiu - MSFT

yogesh_gaur wrote:

"No settings file found in the project. Add a settings file and try again"

Hi Yogesh,

It is a known issue, see: https://connect.microsoft.com/VisualStudio/feedback/ViewFeedback.aspx FeedbackID=285488&wa=wsignin1.0

Seems have fixed in Orcas version.

regards,

rico






Re: Visual C++ General application settings in c++ (Visual Studio 2005)

James Spellman

Yeah. I see the same thing. But it's not C# but rather C++/CLI. I think everyone who says it's working fine is using C# (like that bug report).




Re: Visual C++ General application settings in c++ (Visual Studio 2005)

Bite Qiu - MSFT

James Spellman wrote:
Yeah. I see the same thing. But it's not C# but rather C++/CLI. I think everyone who says it's working fine is using C# (like that bug report).

I agree, just tried this in VS2008 with c++ and c#, the c++ one does not pop error message but the function is dump, c# one works fine. So could you fire another bug report at: http://connect.microsoft.com/visualstudio

thanks very much in advance

-rico






Re: Visual C++ General application settings in c++ (Visual Studio 2005)

James Spellman

I did eventually find a couple C++ bug reports of the same issue. They acknowledge that it's broken but refuse to fix it. So now I guess I'm going to try and follow Yogesh's advice and look at ApplicationSettingsBase.

I did also find a useful article on Code Project about Configuration Files: www.codeproject.com/KB/mcpp/WorkingWithConfigFiles.aspx

I don't know enough yet to understand the differences between the two but I'm getting there...