Search Results

Search found 23 results on 1 pages for 'devlife'.

Page 1/1 | 1 

  • Having trouble running code analysis from command prompt with msbuild

    - by devlife
    I'm using VS2010 RC while targeting .NET 3.5. I can run code analysis via Visual Studio without a problem. However, when I try to run code analysis on our CI server it isn't getting executed. When I attempt to build using msbuild 4.0 I get the following exception: C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v10.0\CodeAnalysis\Microsoft.CodeAnalysis.targets(129,9): error MSB4018: The "CodeAnalysis" task failed unexpectedly. C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v10.0\CodeAnalysis\Microsoft.CodeAnalysis.targets(129,9): error MSB4018: System.TypeLoadException: Could not load type 'System.Runtime.Versioning.TargetFrameworkAttribute' from assembly 'mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 Like I said, it works fine when I run it through VS.

    Read the article

  • MVC2 Binding isn't working for Html.DropDownListFor<>

    - by devlife
    I'm trying to use the Html.DropDownListFor< HtmlHelper and am having a little trouble binding on post. The HTML renders properly but I never get a "selected" value when submitting. <%= Html.DropDownListFor( m => m.TimeZones, Model.TimeZones, new { @class = "SecureDropDown", name = "SelectedTimeZone" } ) %> [Bind(Exclude = "TimeZones")] public class SettingsViewModel : ProfileBaseModel { public IEnumerable TimeZones { get; set; } public string TimeZone { get; set; } public SettingsViewModel() { TimeZones = GetTimeZones(); TimeZone = string.Empty; } private static IEnumerable GetTimeZones() { var timeZones = TimeZoneInfo.GetSystemTimeZones().ToList(); return timeZones.Select( t = new SelectListItem { Text = t.DisplayName, Value = t.Id } ); } } I've tried a few different things and am sure I am doing something stupid... just not sure what it is :)

    Read the article

  • VS2010 Custom Code Analysis Rule

    - by devlife
    I'm trying to write a custom fxcop rule for mstest projects VS2010. I'd like to debug it but keep getting an exception when it tries to load the dll for the mstest project it fails stating that it can't find referenced assembly: Microsoft.FxCop.Common.AssemblyLoadException Could not load C:\Users\Administrator\Documents\Visual Studio 2010\Projects\20100106-CodeAnalysisRulesBlogDemo\BlogDemo\TestProject1\bin\Debug\TestProject1.dll. Microsoft.FxCop.Sdk.InvalidMetadataException The following error was encountered while reading module 'TestProject1': Assembly reference cannot be resolved: Microsoft.VisualStudio.QualityTools.UnitTestFramework, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a. Does anyone have any idea how to resolve this? If I just run the code analysis it works fine but as soon as I try to debug it fails. Thanks

    Read the article

  • How can I copy a TFS 2010 Build Definition?

    - by devlife
    Is there any way to copy a build definition? I work in a mainline source control methodology which utilizes many different branches that live for very short periods (ie. a few days to a week). I'd really like to copy a build template and just change the solution to build. Is there any way to do this?

    Read the article

  • DataAnnotations and Resources don't play nicely

    - by devlife
    I'm using dataannotations in an MVC2 app and am a little discouraged when trying to use RESX file resources for error messages. I've tried the following but keep getting the exception "An attribute [Required(ErrorMessage = Resources.ErrorMessages.Required)] [Required(ErrorMessageResourceName = Resources.ErrorMessages.Required, ErrorMessageResourceType = typof(Resources.ErrorMessages)] I keep getting that error message unless I replace ErrorMessageResourceName with "Required" instead of Resources.ErrorMessages.Required. Can anyone tell me if I'm doing this right?

    Read the article

  • What does this C++ compilation error mean?

    - by devlife
    Does anyone have any clue as to what this might mean? (ClCompile target) -> C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\Platforms\Win32\Microsoft.Cpp.Win32.Targets(147,5): error MSB6006: "CL.exe" exited with code -1073741515. It builds fine on my dev box but fails due to this error on our CI box. It's running on .NET 3.5. Any help would be MUCH appreciated.

    Read the article

  • Lazy Loading with Ninject

    - by devlife
    I'm evaluating ninject2 but can't seem to figure out how to do lazy loading other than through the kernel. From what I can see that kind of defeats the purpose of using the [Inject] attributes. Is it possible to use the InjectAttribute but get lazy loading? I'd hate to force complete construction of an object graph every time I instantiated an object.

    Read the article

  • Can't log in a user in MVC!

    - by devlife
    I have been scratching my head on this for a while now but still can't get it. I'm trying to simply log in a user in an MVC2 application. I have tried everything that I know to try but still can't figure out what I'm doing wrong. Here are a few things that I have tried: FormsAuthentication.SetAuthCookie( emailAddress, rememberMe ); var cookie = FormsAuthentication.GetAuthCookie( emailAddress, rememberMe ); HttpContext.Response.Cookies.Add( cookie ); FormsAuthenticationTicket ticket = new FormsAuthenticationTicket( emailAddress, rememberMe, 15 ); FormsIdentity identity = new FormsIdentity( ticket ); GenericPrincipal principal = new GenericPrincipal(identity, new string[0]); HttpContext.User = principal; I'm not sure if any of this is the right thing to do (as it's not working). After setting HttpContext.User = principal then Request.IsAuthenticated == true. However, in Global.asax I have this: HttpCookie authenCookie = Context.Request.Cookies.Get( FormsAuthentication.FormsCookieName ); The only cookie that ever is available is the aspnet session cookie. Any ideas at all would be much appreciated!

    Read the article

  • How to customize the Visual Studio 2010 RC StartPage recent projects

    - by devlife
    I'd like to play around with customizing the visual studio 2010 rc start page recent items. For what I have in mind I'd need to customize the datasource / databinding but I can't find where the information is coming from. <ScrollViewer Grid.Row="1" HorizontalAlignment="Stretch" Style="{DynamicResource StartPage.ScrollViewerStyle}" VerticalAlignment="Stretch" VerticalScrollBarVisibility="Auto"> <sp:MruListBox DataContext="{Binding Path=RecentProjects}" ItemsSource="{Binding Path=Items}" Background="Transparent" BorderThickness="0" AutomationProperties.AutomationId="MruList"/> </ScrollViewer> Can anyone point me in the right direction? I see that it is binding to RecentProjects but where is that coming from?

    Read the article

  • MVC2 Client Validation isn't working when getting form from ajax call

    - by devlife
    I'm trying to use MVC2 client-side validation in a partial view that is rendered via $.get. However, the client validation isn't working. I'm not quite sure what the deal is. [Required(ErrorMessage = "Email is required")] public string Email { get; set; } <% using ( Ajax.BeginForm( new AjaxOptions { Confirm = "You sure?" } ) ) { %> <%: Html.TextBoxFor( m => m.Email, new { @class = "TextBox150" } )%> <%= Html.ValidationMessageFor( m => m.Email )%> <input type="submit" value="Add/Save" style="float: right;" /> <% } %> I'm not doing anything special to render the the partial view. Just putting the html into a div and showing it in a modal popup. On a side note, does anyone know if it's possible to submit the form with client validation without a submit button?

    Read the article

  • How to get an xml file when running mstest

    - by devlife
    I have a class which loads an xml file using the following: Path.Combine( AppDomain.CurrentDomain.BaseDirectory, "Xml", documentName ); The documents that are being loaded are set to copy to the output directory. However, when I run mstest the xml file is not being copied to the BaseDirectory. Does anyone have any idea how I can accomplish this?

    Read the article

  • Are there any TFS 2010 Dashboards that support multi-project queries?

    - by devlife
    Does anyone know of a TFS 2010 Dashboard that is able to utilize multi-project queries? Our group has several distinct projects that must be managed at the same time. TFS itself supports this. Simply by excluding the Project = @Project (or whatever) we can get back the results we're looking for. Our issue is that we would like to find a nice dashboard (like Telerik Work Item Manager) that also supports this.

    Read the article

  • How to order by column with non-null values first in sql

    - by devlife
    I need to write a sql statement to select all users ordered by lastname, firstname. This is the part I know how to do :) What I don't know how to do is to order by non-null values first. Right now I get this: null, null null, null p1Last, p1First p2Last, p2First etc I need to get: p1Last, p1First p2Last, p2First null, null null, null Any thoughts?

    Read the article

  • How to rollback a database deployment without losing new data?

    - by devlife
    My company uses virtual machines for our web/app servers. This allows for very easy rollbacks of a deployment if something goes wrong. However, if an app server deployment also requires a database deployment and we have to rollback I'm kind of at a loss. How can you rollback database schema changes without losing data? The only thing that I can think of is to write a script that will drop/revert tables/columns back to their original state. Is this really the best way?

    Read the article

  • I can't get areas working in VS2010

    - by devlife
    I just upgraded from VS2010 RC to RTM. Now my areas aren't working. I have a Profile area with a Home controller and an Action method Index(). If I try: http://localhost:4951/profile I get a 404 error saying that the resource can't be found. If I try http://localhost:4951/profile/home I get the same error. However, if I try http://localhost:4951/profile/home/index then the view is returned. Here is my ProfileAreaRegistration: public class ProfileAreaRegistration : AreaRegistration { public override string AreaName { get { return "Profile"; } } public override void RegisterArea(AreaRegistrationContext context) { context.MapRoute( "Profile_Unlock", "Profile/Unlock/{userID}/{unlockID}", new { controller = "Unlock", action = "Index" }, new { userID = new GuidRouteConstraint(), unlockID = new GuidRouteConstraint() } ); context.MapRoute( "Profile_default", "Profile/{controller}/{action}/{id}", new { action = "Home", id = UrlParameter.Optional } ); } Does anyone know what is going wrong?

    Read the article

1