I keep having to look this up, so as a reminder:
<%# Container.ItemIndex %>
… will get the index of the current item in the markup for an ASP:Repeater control.
I keep having to look this up, so as a reminder:
<%# Container.ItemIndex %>
… will get the index of the current item in the markup for an ASP:Repeater control.
God, why is this so difficult? I needed to install the .NET framework 3.5 (for SQL Management Studio, dammit!) on my Windows 8.1 machine. You’re supposed to be able to do this from control panel (Programs and Feature > Turn on Windows Features > .Net 3.5). It didn’t work for me. Continue reading “Installing .NET Framework 3.5 on Windows 8.1”
In the Windows API the maximum length for a path is 260 characters.
Slightly edited for length, but that comes from MSDN. Yes, it’s 2014, we’ve dealt with the 8.3 filename limit, found the Higgs Boson, landed a fridge on a comet, but the Windows API still doesn’t play well 260 character length file paths. That’s unfortunate. Continue reading “File Path Lengths in Windows”
I’ve been studying ASP.NET MVC 4 over the last while; this is the subject of second of the 4 exams required for the SharePoint Developer MCSD, and I really need to spend some time on that.
The idea of an MVC (Model-View-Controller) framework is to separate the different concerns of your code, and that usually this allows you to design a data model, and then let your tools create a scaffolding of your site. Such things aren’t new; I implemented a Chinese Chess web site in Ruby on Rails which uses this approach in 2005. I loved the MVC approach. Continue reading “SharePoint vs (?) ASP.NET MVC”
Sometimes, you want to know if your assembly is a Debug or Release build – like if you’re outputting assembly information for diagnostic purposes. But how do you know? Continue reading “Know whether your assembly is Debug or Release”
This error was appearing in the code analysis for one of my SharePoint projects. It reads:
Warning 1 CA0068 : Debug information could not be found for target assembly ‘Something.exe’. For best analysis results, include the .pdb file with debug information for ‘Something.exe’ in the same directory as the target assembly.
Annoyingly, it didn’t seem to allow you to suppress it, and I was doing a Release build – so I didn’t expect to have a .pdb file. Continue reading “Clearing the CA0068 Error in Code Analysis”
I was trying to attach a debugger to an Outlook plugin I was working on. It was originally written for Outlook 2003, but has been progressively upgraded to 2010. However, I couldn’t breakpoint my code, or rather, the breakpoints weren’t being hit.
Found the answer on Stack Overflow:
So it turns out that Outlook doesn’t load the CLR on startup (it must be loaded shortly thereafter when it becomes necessary), which apparently confuses the VS debugger and causes it to only debug native code. To force it to load the CLR immediately, create an OUTLOOK.EXE.config file in the same folder with:
<configuration> <startup> <supportedRuntime version="v2.0.50727"/> </startup></configuration>
which is from this blog post. Then, even when VS starts attached, it will debug CLR code
So, we’ve been working on putting our SharePoint solutions through a proper build process in Team Foundation Server 2010 (TFS), and I hit a bit of a snag.
I had been given a build definition that had a build process – a Workflow Foundation workflow – that I wanted to alter. The problem was that while I had the XAML file for that workflow, and the DLL that defined some custom code activities that the process used, I didn’t have a full Visual Studio project for it. No problem, I thought, I’ll just open the XAML up in Visual Studio and edit it.
Wrong.
Some further notes on things I’ve learnt using SmartAssembly on some of our products.
As mentioned before, we’ve started to use SmartAssembly to obfuscate some of our products. We also use Team Foundation Server (TFS) as source control and build server. Using obfuscation with code analysis caused some issues, which were compounded by our check-in policies. Continue reading “Obfuscation, Code Analysis, and Check-In policies”