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

Dotnet 3.5 support #9

Open
wants to merge 10 commits into
base: master
Choose a base branch
from
Open

Conversation

akmad
Copy link

@akmad akmad commented Nov 30, 2011

Hello,

I recently discovered the MvcMiniProfiler and love it but then noticed that it is .Net 4.0 only. Here is a simple attempt to remedy that. My goal was to have as minimal an impact on the existing code as possible and thus I centralized most of the changes into the DotNet35Support.cs file.

The major changes are:

  1. Created two new project configurations, NET35-Debug and NET35-Release, that target .Net 3.5 for the MvcMiniProfiler, MvcMiniProfiler.Wcf, and MvcMiniProfiler.Tests projects.
  2. Updated the MvcMiniProfiler project file to use the correct references based on the .Net Framework target.
  3. Created the IConcurrentDictionary<TKey, TValue> interface and updated the SqlProfiler type to use it rather than the ConcurrentDictionary that is only included with .Net 4.0.
  4. Created the MiniConcurrentDictionary<TKey, TValue> type. This type is a very simple synchronized dictionary implementation for the 3.5 version, but should suffice for the required usage. The 4.0 version is simply a subtype of System.Collections.Concurrent.ConcurrentDictionary.

I don't think the other changes are particularly notable and should be self-explanatory. Building a version that targets the 3.5 framework is as simple as changing the configuration to NET35-Debug or NET35-Release and building normally.

Note that I did not update the EF, LinqToSql, or sample projects to support 3.5 as that was out of the scope of my needs.

I hope this is helpful!

@SamSaffron
Copy link
Owner

I am not against this in principle, just needs careful review

@akmad
Copy link
Author

akmad commented Dec 19, 2011

I completely understand; if I can be of any assistance please let me know. Likewise, let me know if you notice any bugs or poor design decisions and I'll fix them.

Thanks!

@RoryBecker
Copy link

I'm also really interested in seeing a 3.5 SKU of this project.

@akmad
Copy link
Author

akmad commented Apr 3, 2012

@RoryBecker As far I know, my personal fork works fine in 3.5; though I have not been keeping up with any changes to the core project.

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

Successfully merging this pull request may close these issues.

5 participants