Click here to Skip to main content
Sign Up to vote bad
good
See more: C#.NETinstaller
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
 
[RunInstaller(true)]
    public partial class Installer : Installer
    {
        public Installer()
        {
            InitializeComponent();
        }
    }
 
before modifying 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
 
Why am getting this and how to resolve this...?
 
Thanks
Posted 6 Jul '12 - 0:34
peru j382


1 solution

The culprit is :
 
public partial class Installer : Installer
 
You are trying to define a partial class which inherits itself. It has nothing to do with installer but you are going against the basic principles.
 
Create a new class which inherits Installer class.
 
public partial class MyInstaller : Installer
  Permalink  
Comments
peru j - 6 Jul '12 - 7:21
I did that...Now i get" Inconsistent accessibility: base class 'windows_setup.Installer' is less accessible than class 'windows_setup.MyInstaller' "
Manas Bhardwaj - 6 Jul '12 - 7:36
Did you change the Consructor name as well?
peru j - 6 Jul '12 - 7:40
Yes .Below is the Code Snippet [RunInstaller(true)] public partial class MyInstaller : Installer { public MyInstaller() { InitializeComponent(); } }
peru j - 9 Jul '12 - 7:19
Any idea ?

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

  Print Answers RSS
Your Filters
Interested
Ignored
     
0 OriginalGriff 178
1 Tadit Dash 144
2 Santhosh G_ 140
3 Sergey Alexandrovich Kryukov 134
4 Espen Harlinn 120
0 Sergey Alexandrovich Kryukov 10,348
1 OriginalGriff 7,965
2 CPallini 4,241
3 Rohan Leuva 3,522
4 Maciej Los 3,184


Advertise | Privacy | Mobile
Web01 | 2.6.130523.1 | Last Updated 6 Jul 2012
Copyright © CodeProject, 1999-2013
All Rights Reserved. Terms of Use
Layout: fixed | fluid