C# Static Contstructor Not Called When Referencing Static Object

by dcurtis 1/16/2010 12:40:00 PM
I had a situation today where I had a static constructor that was never getting initialized and setting some of the default values.  As a result, other content within my code suffered from the same issue.  I searched in vain for a solution and couldn't find anything until I finally revised my search terms.  It turns out that Visual Studio was firing the constructor the first time it would run, but then it encountered an error and would never fire again.  I found a reference in the .Net Development Center that mentioned shutting down the development web server; however, I had already tried that and it didn't do anything for me.  What did work, though, was changing something within the class as the author of that post said (adding a comment, inserting a space, deleting something) and then recompiling and I was finally able to get the static constructor to fire so I could continue to debug the code.  

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Tags:

Visual Studio 2008 | C#

Access is Denied Error While Loading Solution to Subversion via VisualSVN

by dcurtis 9/30/2009 8:57:00 AM

I just installed VisualSVN Server and VisualSVN yesterday as a means of source control for my Visual Studio projects.  The installation went fine; however, when i tried to add my first project to subversion, I kept getting an "Access is denied" error when trying to create a new repository.  I searched around for a solution, and I couldn't find one so I started on a trial and error process until I could find the solution.

When I installed VisualSVN Server, I elected to use Windows Authentication.  Obviously the error indicated there was some type of permissions issue, but I was using an administrative account when running the project so I thought I would have no issues.  I looked at the groups in the management console to see if there were any new groups added with the installation of VisualSVN Server and I did find a new group named "VisualSVN Server Admins" so I added my account to the group and tried again, but I received the same error again.

I thought about the problem for awhile and thought I should try to create the repository using the VisualSVN Server interface and then load the solution to the existing repository rather than creating a new one.  So, I created a new repository, right-clicked on the repository and made sure my account had read/write access to the repository and then tried adding the solution again.  Voila, the solution was added successfully!

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Tags: , ,

VisualSVN | Visual Studio 2008 | VisualSVN Server

Powered by BlogEngine.NET 1.3.0.0
Theme by Mads Kristensen

About the author

Derek Curtis Derek Curtis
President, Plaid Pony Technology Solutions LLC

E-mail me Send mail

Calendar

<<  November 2017  >>
MoTuWeThFrSaSu
303112345
6789101112
13141516171819
20212223242526
27282930123
45678910

View posts in large calendar

Pages

    Recent comments

    Authors

    Disclaimer

    The opinions expressed herein are my own personal opinions and do not represent my employer's view in anyway.

    © Copyright 2017

    Sign in