vcsharp
  •  vcsharp
  • 88.4% (Honored)
  • YAF Commander Topic Starter
2018-04-08T14:45:58Z
Please take a look at this screenshot: YAF tags not being recognized 

When I open the source code for yaf in VS 2017 Community Edition, and then open pages/postmessage.ascx, I am finding that the control tag of YAF and also the method GetPollGroupID() are not being recognized in design view.

I have imported a few namespaces within postmessage.ascx, but it doesn't help.

Question : Is there a trick I am missing in VS 2017 to show the postmessage.ascx without errors?
Sponsor
tha_watcha
2018-04-08T15:56:42Z
Rename the recommend.web.config and add this web.config to the yaf website project, then it should work.
UserPostedImage
vcsharp
  •  vcsharp
  • 88.4% (Honored)
  • YAF Commander Topic Starter
2018-04-08T17:19:11Z
I do not have any web config files and I am using yaf 2.2.3. I have the full source-code of all yaf projects in this solution.

The screenshot of web config files in Solution Explorer is at following url: Missing Web Config files 
vcsharp
  •  vcsharp
  • 88.4% (Honored)
  • YAF Commander Topic Starter
2018-04-08T17:32:11Z
I did find the file you mentioned and renamed it web.config file, but still getting the error of YAF tag not being recognized, though GetPollGroupId() method is being recognized now.
I am now getting error in code-behind of postmessage.ascx and also error for one of the controls in postmessage.ascx.

Here are the screenshots: Errors in Code-behind  and Error in control in design view 
vcsharp
  •  vcsharp
  • 88.4% (Honored)
  • YAF Commander Topic Starter
2018-04-08T17:44:03Z
I think another problem with postmessage.ascx is that many different types of controls have same tag of YAFas in markup below.



<%@ Control Language="c#" AutoEventWireup="True" Inherits="YAF.Pages.postmessage" Codebehind="postmessage.ascx.cs" %>
<%@ Import Namespace="YAF.Core" %>
<%@ Import Namespace="YAF.Types.Interfaces" %>
<%@ Import Namespace="YAF.Utils" %>
<%@ Import Namespace="YAF.Types.Extensions" %>
<%@ Import Namespace="YAF.Controls" %>
<%@ Register TagPrefix="YAF" TagName="smileys" Src="../controls/smileys.ascx" %>
<%@ Register TagPrefix="YAF" TagName="LastPosts" Src="../controls/LastPosts.ascx" %>
<%@ Register TagPrefix="YAF" TagName="PostOptions" Src="../controls/PostOptions.ascx" %>
<%@ Register TagPrefix="YAF" TagName="PostAttachments" Src="../controls/PostAttachments.ascx" %>
<%@ Register TagPrefix="YAF" TagName="PollList" Src="../controls/PollList.ascx" %>
<%@ Register TagPrefix="YAF" TagName="AttachmentsUploadDialog" Src="../controls/AttachmentsUploadDialog.ascx" %>

<YAF:PageLinks ID="PageLinks" runat="server" />
<YAF:PollList ID="PollList"  ShowButtons="true" PollGroupId='<%# GetPollGroupID() %>'  runat="server"/>
vcsharp
  •  vcsharp
  • 88.4% (Honored)
  • YAF Commander Topic Starter
2018-04-08T17:56:59Z
At least the yaf solution is now successfully building 15 projects, even though design time errors are there. So that's good enough for me.
Thanks and I appreciate your help on this.

I think its important to close solution and restart VS 2017, in order for web config control changes to take effect.
tha_watcha
2018-04-08T17:59:12Z
The errors in design view are normal and will never go away.

The other errors are probably caused because you modified the ascx file before you added the web.config file. This caused the ascx.designer.cs files to regenerate with the wrong controls. Modify that file manually and fix all the yaf controls, or replace the file from the source package.
UserPostedImage
tha_watcha
2018-04-08T18:14:16Z
Why are you using an old version and not the latest version?
UserPostedImage
vcsharp
  •  vcsharp
  • 88.4% (Honored)
  • YAF Commander Topic Starter
2018-04-09T04:18:12Z
Originally Posted by: tha_watcha 

The errors in design view are normal and will never go away.

The other errors are probably caused because you modified the ascx file before you added the web.config file. This caused the ascx.designer.cs files to regenerate with the wrong controls. Modify that file manually and fix all the yaf controls, or replace the file from the source package.



Yes, I had made changes to ascx when web config file was not there.
So, you meant to manually modify the ascx.designer.cs files?

vcsharp
  •  vcsharp
  • 88.4% (Honored)
  • YAF Commander Topic Starter
2018-04-09T04:20:53Z
Originally Posted by: tha_watcha 

Why are you using an old version and not the latest version?



I am using 2.2.3 and have made some changes to source code to better suit my requirements.

Due to these changes, I am hesitant to upgrade since the new version would overwrite all my changes.

tha_watcha
2018-04-12T17:27:50Z
Originally Posted by: vcsharp 

Originally Posted by: tha_watcha 

Why are you using an old version and not the latest version?



I am using 2.2.3 and have made some changes to source code to better suit my requirements.

Due to these changes, I am hesitant to upgrade since the new version would overwrite all my changes.



Try to create diff patches of the changes you make. Then you can directly apply them after each update


UserPostedImage
vcsharp
  •  vcsharp
  • 88.4% (Honored)
  • YAF Commander Topic Starter
2018-04-19T06:40:04Z
Yes, that is a good suggestion. Right now I am making changes by adding custom user control and including custom JavaScript in separate script file.
But later on, I intend to put these differences into a separate patch.
vcsharp
  •  vcsharp
  • 88.4% (Honored)
  • YAF Commander Topic Starter
2018-09-17T05:55:06Z
Originally Posted by: vcsharp 

Yes, that is a good suggestion. Right now I am making changes by adding custom user control and including custom JavaScript in separate script file.
But later on, I intend to put these differences into a separate patch.



Do you know of a good tool for diff patches other than just using TFS for finding differences?
tha_watcha
2018-09-18T16:50:02Z
What I mean by that is to use git and create a fork with the changes you make. As soon you commit any changes to your forked yaf repository you can create a diff patch from the changes you made. To send a a pull request for example or track the changes you made.
UserPostedImage
vcsharp
  •  vcsharp
  • 88.4% (Honored)
  • YAF Commander Topic Starter
2018-09-19T02:37:36Z
Ok. Thanks, I get it now. Also, in TFS you can make diff patch through command line as mentioned in following link: https://blogs.msdn.micro...ke-a-diffpatch-with-tfs/ 

About Us

The YAF.NET is an open source .NET forum project. YAF.NET is supported by an team of international developers who are build community by building community software.

Powered by Resharper Donate with PayPal button

Project Twitter Updates

Copyright © YetAnotherForum.NET & Ingo Herbote. All rights reserved