Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6665737
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T02:45:17+00:00 2026-05-26T02:45:17+00:00

I am trying to test my custom membership provider using MSTest in VS2010, but

  • 0

I am trying to test my custom membership provider using MSTest in VS2010, but keep getting an error System.TypeLoadException: Could not load type 'TafAdris.Security.TafAdrisMembershipProvider' from assembly 'TafAdrisSecurity'.

After a lot of struggling, I realized that MSTest cannot find my assembly even though I specified Copy Local in the References folder. Next I tried debugging the unit test and in the Watch window I type Environment.CurrentDirectory. I get the following folder:

C:\Users\XYZ\Documents\Visual Studio 2010\Projects\CustomSecurityProviderApp\TestResults\XYZ_PCNAME 2011-10-11 18_24_55\Out

But the Test project output folder is specified in a totally different location. Has anyone had a similar issue? Do you know how to force MSTest to load DLL from a specific location?

I tried specifying additional folders in Test Settings -> Unit Test but that seems to be ignored.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T02:45:18+00:00Added an answer on May 26, 2026 at 2:45 am

    OK, I solved this. This is the solution:

    [AssemblyInitialize]
    public static void AssemblyInit(TestContext context)
    {
        System.Environment.CurrentDirectory = @"C:\Users\username\Documents\Visual Studio 2010\Projects\CustomSecurityProviderApp\CustomMembership.Test\bin\Debug";
    }
    

    This caused test to run in the specified directory where my custom membership is located.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I created a custom membership provider and am getting the following error trying to
I'm trying to create a custom LinearLayout (on Android), but I keep getting compiler
I'm trying to test my asp.net mvc3 custom membership provider. I can't seem to
I'm trying to test my custom membership provider as it was described here On
just trying to test for equality in this piece of code, but getting a
I'm trying to unit test a custom ConfigurationElementCollection , but I'm having a problem
I am trying to host my service using following configuration. <system.serviceModel> <services> <service name=Test.MyService
I'm trying to unit test a custom WPF control using NUnit. The control is
I am ultimately trying to unit test a custom base adapter, but I am
I'm trying to exercise custom role provider methods. Each test is on its own,

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.