Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FileLoadException #11

Closed
aadamsx opened this issue Sep 12, 2013 · 5 comments
Closed

FileLoadException #11

aadamsx opened this issue Sep 12, 2013 · 5 comments

Comments

@aadamsx
Copy link

aadamsx commented Sep 12, 2013

Hi,

I followed your April 1st instructions on installing and configuring this tool. I installed version 0,1.5 from nuget.

I placed the,

config.MessageHandlers.Add(new
PerfItDelegatingHandler(config, "My test app"));

code in my WebApiConfig.Register() method

And added Installer template file (I named it PerfitInstaller), but it didn't have any Install/Uninstall virtual methods to be overwritten, only,

[RunInstaller(true)]
public partial class PerfItInstaller 
    : Installer
{
    public PerfItInstaller()
    {
        InitializeComponent();
    }
}

So the only way I deviated from your post was that I didn't implement the,

public override void Install(IDictionary stateSaver)
{
base.Install(stateSaver);
PerfItRuntime.Install();
}

public override void Uninstall(IDictionary savedState)
{
base.Uninstall(savedState);
PerfItRuntime.Uninstall();
}

as you said... I just left everything alone in this file.

Then added,

    [PerfItFilter(Description = "Gets tenant by id",
        Counters = new[] { CounterTypes.TotalNoOfOperations, 
        CounterTypes.AverageTimeTaken })]

as an attribute on one of my Get(int id) methods.

Opened the vs command line and InstallUtil.exe -i Proto.Api.dll, it stated the commit phase completed successfully.

The log file looks like so,

Committing assembly 'D:\xxx\xxx\xxx\Proto3\Proto.Api\bin\Proto.Api.dll'.
Affected parameters are:
i =
logfile = D:\xxx\xxx\xxx\Proto3\Proto.Api\bin\Proto.Api.InstallLog
assemblypath = D:\xxx\xxx\xxx\Proto3\Proto.Api\bin\Proto.Api.dll
logtoconsole =

I do a F5, and it throws on

Application_Start => WebApiConfig.Register()

The exception is:

{"Could not load file or assembly 'System.Web.Http, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)":"System.Web.Http, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"}

@aadamsx aadamsx closed this as completed Sep 12, 2013
@aadamsx aadamsx reopened this Sep 12, 2013
@aadamsx
Copy link
Author

aadamsx commented Sep 12, 2013

didn't mean to hit closed...

@aliostad
Copy link
Owner

Hi,

First of all, the step you have omitted means you will not be able to install the counters and you would not be able to use them.

After that, try this to see why it is not loading.

@aliostad aliostad reopened this Sep 14, 2013
@aadamsx
Copy link
Author

aadamsx commented Sep 15, 2013

Thanks for the feedback and opening up this tool to us (also you have a kick-butt blog).

So how/where should I implement these two?

public override void Install(IDictionary stateSaver)
{
base.Install(stateSaver);
PerfItRuntime.Install();
}

public override void Uninstall(IDictionary savedState)
{
base.Uninstall(savedState);
PerfItRuntime.Uninstall();
}

After this, if I'm still running into issues, I'll follow the link to the work around.

Thanks again --

@aliostad
Copy link
Owner

Thanks. Let me know what happens.

@aliostad
Copy link
Owner

Same as #14

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants