Click here to Skip to main content
15,900,108 members
Please Sign up or sign in to vote.
4.00/5 (2 votes)
I have created a widows application with setup project. I compiled and build.Everything looks fine.

For changing the configuration file during installation am trying to add a new Installer file. when i add it by default i get the below code


C#
Collapse | Copy Code
    
    [RunInstaller(true)]
        public partial class Installer : Installer
        {
            public Installer()
            {
                InitializeComponent();
            }
        }


When i compile this Am gettin
Circular base class dependency involving 'windows_setup.Installer' and 'windows_setup.Installer'

windows setup is the name space i used for the application. Then i found that i need to create the new classs which inbherits Installer.So i changed my class name to
C#
public partial class Installer : Installer



Now am Getting

Inconsistent accessibility: base class 'windows_setup.Installer' is less accessible than class 'windows_setup.MyInstaller'

Suggest your ideas.

Thanks
Posted

1 solution

You should definitely not extend a class over it's own name:
C#
public partial class Installer : Installer

Give it own identifier, and of course it's own constructor:
C#
public partial class MyInstaller : Installer

Consult msdn[^]
 
Share this answer
 
v3
Comments
peru j 11-Jul-12 7:19am    
As i mentioned i did changed the name now am getting "Inconsistent Accesiblity" Error
Zoltán Zörgő 11-Jul-12 7:24am    
According to your post, you have not. But have yo added a proper constructor also? Paste all the class code here if possible.
peru j 11-Jul-12 9:02am    
Somehow i managed to fix the compiler Errors.But now my installer class is not getting called. Kept a Break point on the file but never stops. Any suggestion ?
Zoltán Zörgő 11-Jul-12 12:57pm    
Post your code here, so we can help you! We don't see your screen nor read your mind!

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900