Unable to Upload (analyzer and code fix extension) to Nuget - nuget-package

I am trying to upload the analyzer and code fix extension to Visual Studio gallery
It's throwing an error. I have chosen the visual Studio code of extension type of the three available options which I attached in the image. Am I using the correct extension type? or i am doing something wrong.
How to upload the extension to NuGet?

The answer is right in the exception:
ID must be less than 63 characters and can only contain letters, numbers and dashes.
Your ID contains a . - which is not allowed. It looks like your appending ..{Guid} to the end of your ID.
Change the ID of your extension to just be BasicAnalyzer and you should be fine. Although, a more specific name might help anyone trying to find and use your analyzer.

Related

Creating a hotfix, welcome message has wrong information

I'm creating a hotfix based on an installation file. When I run the hotfix, the first dialog box shows "Welcome to the hotfix for App version . Nothing in my hotfix project refers to this wrong number and I don't see a way to override the value it's putting there. The .msi file in the base image folder did have references to the wrong version number, but I changed them. The hotfix file is still showing the wrong version number. Any idea how I can override this or find where it's pulling this wrong version number from? Thanks!
Open Dialog editor in InstallShield (located under User Interface > Dialogs) and find InstallWelcome dialog. See what its text looks like; maybe there is some hardcoded version referred there. If there is no hardcoded version, see what property is being referred to in the text (e.g.[ProductVersion]), and make sure it's a correct property and it's set to the correct value.

File association and thumbnail preview in Windows 10

I have created an application and associated on registry a file extension on Windows 10, so when you double click a file associated with my extension, it opens my app with the file as parameter.
Now, I want the files associated to my application to behave in Windows 10 just like images - I mean, having a thumbnail preview, so when the user selects "large icons", he would be able to see a preview of the file.
I wonder how can I do it. What kind of metadata my file should have so Windows would recognize it and show a preview. Of course, I don't want just large icons, I want a file preview just like image files.
It isn't hard for me to generate a preview bitmap and integrate it to the file format I created (or even to change the file format completely, since I didn't publish anything yet), but how would windows recognize it? Is this even possible?
Thanks in advance
After some research, I found a sample code that does exactly what I need. It creates a thumbnail provider, which have access to the file's contents (binary), and then I can use it to generate the thumbnail of the file.
The sample that creates a IThumbnailProvider can be found here:
https://code.msdn.microsoft.com/windowsapps/CppShellExtThumbnailHandler-32399b35/view/SourceCode#content
The project should generate a dll, that we should register on Windows. It might be done using the following lines:
system32/regsvr32 ThumbnailProviderx64.dll
syswow64/regsvr32 ThumbnailProviderx86.dll
unregistering is like this:
system32/regsvr32 /u ThumbnailProviderx64.dll
syswow64/regsvr32 /u ThumbnailProviderx86.dll
Another nice sample could be found at:
http://www.codemonkeycodes.com/2010/01/11/ithumbnailprovider-re-visited/

How to fix SPFeatureDefinition does not contain a definition for RootDirectory

I'm very new to SharePoint development, and I'm just trying to add an XML file to a Feature to reference the XML file content in the feature Event Receiver.
It seems that the general recommendation is to use do so like in this SO question:
How to retrieve data from an XML file in a Sharepoint 2010 Feature Event Receiver?
However, my code does not compile when I reference the RootDirectory property. The error I see is below
'Microsoft.SharePoint.Administration.SPFeatureDefinition' does not contain a definition for 'RootDirectory' and no extension method 'RootDirectory' accepting a first argument of type 'Microsoft.SharePoint.Administration.SPFeatureDefinition' could be found (are you missing a using directive or an assembly reference?
Now, the weird part is that while debugging, I am able to evaluate the RootDirectory property correctly in the Quick Debug window.
Am I missing something obvious? Like I said, I'm completely new to SharePoint.
My feature is scoped to the Web level, and I do have a reference to Microsoft.Sharepoint.Administration in my using statements.
Any help is greatly appreciated, thanks.
It was indeed something very basic.
The solution/project was set as Sandboxed. Just going to the properties of the project (not the property pages but hitting F4 while the project is selected on Solution Explorer) and setting Sandboxed to false will let you compile when you're accessing the RootDirectory solution in code.
Also, a few other properties/method not show up when the solution is Sandboxed instead of marked as a Farm solution.

Subsonic 3 not generating classes

I followed the 3 step procedure 20 times on 3 different sytems under all possible conditions and no matter what I do it won't generate the classes. I keep getting the following error:
Loading the include file 'SQLServer.ttinclude' returned a null or
empty string. The transformation will not be run.
Any ideas?
I have tried all the solution I found on google but no luck. So I decided to dig into this issue. As you can see, the error tell that generator can not load the include file "SQLServer.ttinclude" although the include file exists. If it can not read include file, why don't we include content of SQLServer.ttinclude instead of including file ?
Copy content of SQLServer.ttinclude to all *.tt as below steps:
Make sure that you have follow this instruction on Subsonic homepage first [link text][1]
[1]: http://subsonicproject.com/docs/Using_ActiveRecord
For each .tt file:
Delete <## include file="SQLServer.ttinclude" #>
Copy and paste content of SQLServer.ttinclude to the end of .tt files
Right click on .tt files -> Run custom tool. The *.cs files will be generated. Compile now !!!!
A little funny thing that I've noticed: After doing above steps and get *.cs file generated. You can simply copy and paste template files again into your solution explorer exact the instruction in [link text][1] and the *.cs file generated without doing any tricks !!!
Hope this helps.
Hai
Try adding the .tt and .ttinclude files to the VS project via Right click -> Add -> Existing Item, rather than dragging the files into VS. Seemed to make the difference for me.
Check the rights associated with the credentials used to authenticate access to the database. You need dbo access for the entity classes to be generated.

SharePoint: "Failed to extract the cab file in the solution"

I'm receiving a "Failed to extract the cab file in the solution" error when I try to deploy my wsp using stsadm -o addsolution -filename...
I've open the wsp as a cab and checked that there are no duplicate files in there as I understand that can sometimes cause this issue.
The issue only started when I tried to include a custom field type as part of my solution, to do this I added the following to the ddf
..\CustomFields\ShortMonth\ShortMonthControl.ascx ..\CONTROLTEMPLATES\ShortMonthControl.ascx
..\CustomFields\ShortMonth\fldtypes_shortmonth.xml ..\XML\fldtypes_shortmonth.xml
and
<TemplateFiles>
<TemplateFile Location="CONTROLTEMPLATES\ShortMonthControl.ascx"/>
<TemplateFile Location="XML\fldtypes_shortmonth.xml"/>
</TemplateFiles>
to the manifest.
I've tried taking it back to just references to the ascx in both but it doesn't see to help.
Any ideas?
Check that you don't have any special characters in your files. They might have sneaked in as a result of copy-paste. For example, the way your code sample renders on this page, it has the (`), which shouldn't be there.
Do you need the "..\" in your DDF?
The issue is more likely due to invalid names for files you are deploying on SharePoint 14 hive folder. If you are using parenthesis ‘(‘, ‘)’ in file names or special characters like # in file names, this issue will occur.
Remove it and issue should vanish.
I just know I have had the same issues and I think I made a note of it at work somewhere (I´ll check that tomorrow and post back here if I find something). I just can´t remember how I fixed it right now (maybe it was a slash the wrong way / vs. \..hmm).
I did a search for it on google (which I think you have also done). Found this (check it out):
http://www.codeplex.com/wspbuilder/WorkItem/View.aspx?WorkItemId=7385
The List Instance Name I had was "MyListInstance (List Instance)". I removed the brackets from the name and it deployed without issues.
Check the .ddf file for a line that could have been accidentally duplicated. Apparently sharepoint doesn't like that!
A reboot solved my 'Failed to extract cab file' problem. There were some updates installed and an reboot was required. Was not clear that this was related but it helped.
Something would have gone wrong during the build of WSP.
Re build the WSP and Deploy- it should work fine.

Resources