Can't correct deploy infopath 2010 form with formcode - deployment

I'm new in Infopath developing, please help. :(
So I'm developing work-flow with custom task edit form.
I designed infopath form CustomApprovalForm.xsn in Infopath Designer 2010 and then I published this form to Workflow project in Module folder which named Form(ApproveWF/Form/).
Then I configured all needed properties for correct deploying. After deploying all works ok and form appears as it should be.
But when I come back to Infopath designer 2010 and add some formcode to CustomApproval.xsn and then I press quick publish to Module folder which I use above and then I deploy the workflow to SP server.
After this the form doesn't appear.
In logs I saw exception:
"Solution deserialization failed with unhandled exception
System.IO.FileNotFoundException: Could not load file or assembly
'file:///C:\Program Files\Common Files\Microsoft Shared\Web Server
Extensions\14\Template\Features\ApproveWF_Feature1\CustomApprovalForm.dll'
or one of its dependencies. The system cannot find the file
specified...."
I suppose, that I'm not correct making publishing infopath form with code behind.
How to correct do publishing infopath 2010 form with code behind to my ApproveWF project which then deploy to SP server?
Where should I place the CustomApproval.dll?
Please help me!!!!

I believe, but I'll have to double-check, that what happened is that you did a full publish first with no code behind the form - this registered the manifest, which did not include a reference to a .dll, since there wasn't one.
You then added code, which gets compiled into a dll, listed in the manifest for the form.
I think when you do a quick-publish, the form files are copied up to the server, but the manifest isn't re-registered. So the form xml/xsl will have calls to the dll, but the manifest won't know where to find it, since it wasn't updated.
tl;dr: when you publish a form then add code to it, you have to run a full publishing cycle again to update the installed manifest.
Post a follow-up if this doesn't work.

I've found the solution.
I have to add new item to Workflow project which named Empty Element. And then I've added dll of xsn CustomForm to it. And then I've deployed this dll with xsn form like feature to sharepoint.

Related

can't upload custom process template in Azure DevOps Server 2020

I'm trying to create a custom process template in Azure DevOps Server 2020. I'm using the on-premises XML process model. When I upload my custom process template I keep getting 'You can't update a system process' error.
These are the steps I took:
Downloaded the Agile system process by going to Collection Settings->Process, clicking on Agile and choosing 'Export'.
I unzipped the downloaded folder and opened it in Visual Studio.
I made changes to field names and added new states for bugs.
I changed the name and version in the ProcessTemplate.xml like so:
<metadata>
<name>CustomProcess</name>
<description>This is a custom process template based on the Agile process</description>
<version type="ADCC42AB-9882-485E-A3ED-7678F01F66BC" major="1" minor="0" />
I renamed the folder to CustomProcess and zipped it.
In Collection Settings->Process, I clicked on 'Upload process template' and tried to upload my CustomProcess zipped folder. I get the error 'You can't update a system process'.
I made sure to update the name and version as suggested in a previous Stackoverflow post but I still get an error. Is there something else I need to modify in the XML files?
Check this answer: https://developercommunity.visualstudio.com/content/problem/310354/cant-upload-a-custom-process-template-to-tfs-2018.html
You have to change the name and the version of the template
I looked at some more related Stackoverflow posts and found this one helpful. The issue was I need to generate a new GUID for the version. I went into Visual Studio, go to Tools -> Create GUID. Choose the number 6 option for the GUID format. Paste the GUID into the version type: <version type="[paste GUID here]" major="1" minor="0" />
Hopefully this will help someone else with a similar issue. The official documentation doesn't mention any of this which is very disappointing.

NuGet Server cannot find .nupkg package files

Okay this is a derivative of Could not load file or assembly 'NuGet.Server, Version=2.11.1.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies seeing as though I couldn't find a solution to that.
I am publishing my Nuget Server project to my Windows 2012 R2 server and pointing to the applicable directory where the files live. The package files exist, as shown below in the screenshot however I keep on getting the below error:
Severity Code Description Project File Line Suppression State
Error Copying file Packages\PackageName.1.0.0.nupkg to obj\Release\Package\PackageTmp\Packages\PackageNameJson.1.0.0.nupkg failed. Could not find file 'Packages\PackageName.1.0.0.nupkg'. nuget_server_02 0
I have NuGet Server v2.11.3 installed and my project targets .NET Framework 4.6. One thing to note is that the packages themselves are from an earlier version of .NET - most likely 3.5.
This is my web.config file:
<add key="packagesPath" value="D:\RootFolder\SubFolder\SolutionNameFolder\ProjectNameFolder\Packages"/>
Even after several Restore NuGet Packages attempts I am still faced with this dilemma. The one thing I am really struggling to understand is if I point the packagesPath to a local directory, it works and does retrieve the packages however, when I point to the very same project on my server I get this headache.
Previously, in the included link to the related SO question, I could publish but now I can't even get through that stage even though I never made any changes to the project since last working on it. I decided to revisit it today.
UPDATE:
I have deleted the bin folder and rebuilt my solution as per Could not load file or assembly 'someProject' or one of its dependencies. Access is denied But it still can't find the file.
You can run your nuget server and it will show an html file as output (Default.aspx). You can, of course, modify this file to make it look like anything you want and otherwise change it. You can't change the way the nuget server service behaves because that is run from a dll. You should be able to show your repository files using the output page of your nuget server.
I encountered a similar set of errors, and monitored the Event Viewer while I was trying to show the contents of my repository.
The Event Viewer showed that an error was being thrown every time my Nuget Server attempted to list the contents of the packages folder.
Keeping in mind that nuget packages are zip files, and to display the details on the information contained in the nuget packages, the nuget server must unzip them. If the file is corrupted, the server will throw an error and stop attempting to list the contents of any further files. This error results in a w3wp.exe crash. It will be recorded as an ASP.NET error in the Windows->Applications section of the event log.
The cure for me was to delete the contents of the packages folder on my nuget server, and re-up them.
This may be impractical if you have a lot of files in your repository, so any files that were uploaded near the first error shown in the event viewer should be chosen for upload first.
One of the files is likely corrupted.
I would recommend checking out the event viewer on your server, and making sure you have no corrupted files in your repository.
You can view (and edit, to a point) your repository contents with Nuget Package Explorer. If the file you want to view is corrupted, then it should show an error for that file. You can then re-up that file, and if the problem is a file problem, this will cure it.
You can also reinstall your nuget server if that fails. It is somewhat unlikely that the code has been corrupted, but worth a shot.
Good luck.

Building/deploying azure webjob with website copies source files instead of binaries/executable

I've added a webjobs sdk project to my existing website. The website runs as an azure app service. I've always done building and deployment by queueing up a new build in visual studio online and deploying from there to my azure website. Recently I created this webjob project in the same solution, that based on this webjobs-list.json generated and put in the website project should cause the webjob to also be deployed with the website during deployment (or so the documentation says). What is happening though is that when it deploys, and I take a look at what is in app_data\jobs\continuous, is not the binaries and executable that I expect, it's the actual source code/project files that have been copied into there. Obviously that isn't going to run, and it shouldn't have thrown source code out there on my website anyway.
I also had to change my release definition in visual studio online to just look for [my website project name].zip, instead of just *.zip, because otherwise I'd get an error from the release indicating: Error: More than one package matched with specified pattern. Please restrain the search patern.
...this appeared to be because the build process not only creates a zip file for my website, it also creates one for the webjobs project. From what I understand and have read, I am supposed to change my release to just look for the website zip file and ignore the other zip file, and just let that get deployed and it should all work fine, but again, what is copied into my jobs folder on the website isn't the binaries or executable for the webjob, it's the actual source files.
How can I get this to deploy just the binaries and executable with the site instead of the source files?
The only other thing I could find to do is remove the webjobs-list.json file from the web project so they are no longer linked together, which causes the build to no longer populate app_data\jobs\continuous with my web job project source files when deployed, and to create an additional task in my release definition to grab and deploy the other zip file that is created during the build (for the webjob project, and it contains the debug files with those binaries for whatever reason). However everything I read tells me that this is not supposed to have to be done, it should just work without me having to do this.
EDIT:
My web project is an MVC 5 project that I created with VS 2013. The web jobs project uses the 2.0.0.0 version of the webjobs sdk.
The build and release definitions, I followed the steps in this article to create:
https://www.visualstudio.com/en-us/docs/build/apps/cd/deploy-webdeploy-webapps
The only additional thing I did after following this article, is in my release definition, I changed the Package or Folder field to look for [my mvc web project name].zip, instead of *.zip, otherwise I'd get the error message noted above.

Ajax Controls Toolkit and Ajaxmin

I am learning how to use the Ajax Control Toolkit using VB.NET in code-behind in Visual Studio 10.0.40219.1 SP1Rel, .NET 4.0.30319 SP1Rel. I have been to many websites and tried lots of code, using the AnimationExtender. The sample that came with the toolkit works perfectly, but on
http://localhost:1049/
which is different from my "view code in browser" url:
http://localhost:4258/
When I change the url to mine, I get this error:
Could not load file or assembly 'AjaxMin, Version=4.97.4951.28478, Culture=neutral, PublicKeyToken=21ef50ce11b5d80f' or one of its dependencies. The system cannot find the file specified.
Nothing in the installation instructions mentions this. I can't run the page I'm using to learn how to use the AnimationExtender. I am at a loss, and I can't find anything like this on Google or here.
Thanks!
Matty's suggestion to check the sample project sent me back to the directory where I'd unzipped it, then checked the file AjaxControlToolkit.Binary.NET40.zip, which had the AjaxMin.dll file in it. I had admin move the file to C:\Program Files\Microsoft Visual Studio 10.0\VB\Bin (I don't know if that directory matters, it works for me), then in VS added the DLL as a reference to the project. The few errors I've gotten since are nothing to do with ajaxmin.
I had the same problem, I had to copy the file AjaxMin.dll from where I extracted the AjaxControlToolkit.Binary.NET40.zip, to my project's bin folder. i.e. C:\Users\MyUserName\Documents\Visual Studio 2010\Projects\MyProject\MyProject\bin
Rebuilt the solution and this time worked fine..
Hope that will help you :)

Is it possible to xcopy deploy the Microsoft ReportViewer web control?

I'm trying to setup Microsoft reporting on a shared hosted server. I've set up the web.config files with the necessary entries and uploaded the assemblies Microsoft.ReportViewer.Common.dll and Microsoft.ReportViewer.WebForms.dll as well as the file Microsoft.ReportViewer.xml via FTP.
The site loads OK, but when I try to load a report a get a missing reference to Microsoft.ReportViewer.ProcessingObjectModel.dll. If I can get a hold of a copy of this dll, can I expect the report view to work? If so, what's the best way to get a copy? Or should I start trying to cajole the server administrator to run ReportViewer.exe?
This project is using Visual Studio 2008.
It appears that the answer is yes. I had never extracted a file from the GAC before, but it was pretty easy by following the command line method described in this question. Once the correct version of Microsoft.ReportViewer.ProcessingObjectModel.dll was extracted from the GAC on my development machine and uploaded to the site, the reports started working.